2
votes

I have a problem with SessionFactory bean package scanning … my application is using spring boot and spring data neo4j … 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.

has anyone ever had a similar issue ? any idea?

1
please open an issue at github.com/neo4j/neo4j-ogm/issuesLuanne
Thanks @Luanne , I will.Lina
This is the issue linkLina
produces Neo4jSession is not an instance of a persistable class - for SEO, guys cause it was very hard to find a damn answerAlex

1 Answers

2
votes

As @Luanne mentioned , I filed an issue in github for this. However I found a workaround to solve this.The problem is that the current version of neo4j OGM does not support ".war" file scanning in the ClassPathScanner class ... & unfortunately I am putting a war file into my container. So instead of putting a ".war" in the docker container , I put a ".jar" version of my spring boot app in the container and it worked ! So if deploying a war in the container is not mandatory , you can try this solution , otherwise you have to wait till the issue link is resolved. :-)