New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Neo4j bean classes are not loaded properly when I deploy the app using docker #211
Comments
I just tried another scenario and it worked ! so instead of putting a ".war" in docker container , I put a ".jar" version of my app in the container and it worked ! So to be more specific , we need to add "*.war" scan support in "org.neo4j.ogm.scanner.ClassPathScanner". Please see attached screenshot. |
Thank you for the additional information @linahovanessian! |
@linahovanessian Renaming .war to .jar works because the scanner is able to recursively scan subdirectories of the archive: in this case WEB-INF/classes and WEB-INF/lib. Of course a lot of non-domain class artefacts will also be scanned in a web archive when you do this, but in the interests of quickly fixing this issue we can add explicit support for .war, in the way you suggest. In future we can look at having smarter scanning for .war archives that inspects just WEB-INF/classes and WEB-INF/lib if we need to do this. |
@linahovanessian Latest 2.0.5-SNAPSHOT now contains a fix for this. Please let us know if this resolves your problem. |
Thanks @vince-bickers . Will give it a try... Will keep you updated. |
Works fine for me.... Thanks team ! |
My application is using spring boot and spring data neo4j-4… If I run the app via spring boot , everything works fine and all of my bean classes get loaded in the session factory without any problem. The problem shows up when I use the docker deployment version… for some reasons the packages are not loaded properly in “org.neo4j.ogm.metadata.DomainInfo” class … So the classNameToClassInfo map remains empty after initialization. In other words “return new SessionFactory(getConfiguration(), "XXX.XXX.XXX.beans");” does not work for docker deployment version. The bean packages path is not resolved properly.
I am deploying a war file in the docker container.
stackoverflow
The text was updated successfully, but these errors were encountered: