I'm trying to move my project from SDN Neo4j 3 to SDN Neo4j 4 and to Neo4j 3.0.1.
Right now I'm fails with a following exception:
java.lang.NoClassDefFoundError: org/neo4j/ogm/result/ResultAdapter
at org.neo4j.ogm.drivers.embedded.request.EmbeddedRequest.execute(EmbeddedRequest.java:69)
at org.neo4j.ogm.session.delegates.ExecuteQueriesDelegate.executeAndMap(ExecuteQueriesDelegate.java:110)
....
Caused by: java.lang.ClassNotFoundException: org.neo4j.ogm.result.ResultAdapter
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 92 more
In my Maven pom I have following dependencies:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-api</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-drivers</artifactId>
<version>2.0.0-M02</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-enterprise</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>4.1.1.RELEASE</version>
</dependency>
How to fix this issue ?
Keep your dependency versions for neo4j-ogm-api and neo4j-ogm-drivers in sync:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ogm-drivers</artifactId>
<version>2.0.0-M2</version> <!-- this should be 2.0.2 -->
</dependency>