1

Since about a week ago, running tests with InProcessServer on 4.0.0.BUILD-SNAPSHOT results in the following exception:

Caused by: java.lang.NoClassDefFoundError: org/neo4j/ogm/testutil/TestServer
at org.springframework.data.neo4j.server.InProcessServer.<init>(InProcessServer.java:25) ~[spring-data-neo4j-4.0.0.BUILD-SNAPSHOT-tests.jar:na]
at com.ninjasquare.server.test.integration.IntegrationTestConfig.neo4jServer(IntegrationTestConfig.java:43) ~[test-classes/:na]

Swithing the test dependency back to 4.0.0.M1 resolves the issue:

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-neo4j</artifactId>
    <version>4.0.0.M1</version>
    <type>test-jar</type>
</dependency>

I assume it's something to do with some refactoring work on SDN4/OGM?

Thanks.

Luanne
  • 19,145
  • 1
  • 39
  • 51
user1838830
  • 131
  • 1
  • 6

1 Answers1

3

Yes, in recent snapshots, the OGM has been separated from SDN. You'll need to include these two dependencies now to use the test utilities.

       <dependency>
           <groupId>org.neo4j</groupId>
           <artifactId>neo4j-ogm</artifactId>
           <version>1.1.0</version>
           <type>test-jar</type>
           <scope>test</scope>
       </dependency>
       <dependency>
           <groupId>org.neo4j.test</groupId>
           <artifactId>neo4j-harness</artifactId>
           <version>${neo4j.version}</version>
           <scope>test</scope>
       </dependency>
Luanne
  • 19,145
  • 1
  • 39
  • 51
  • Thanks Luanne. It appears the neo4j-kernel, neo4j-server and neo4j-io dependencies with test-jar are no longer needed for tests. Can you confirm? And in general instead of asking these questions on stackflow are there any better/preferred ways to report issues and get notified breaking changes? I'm hesitant to create issues on JIRA as I usually don't know whether it's bug, feature to be implemented in the future, or package refactoring, etc. Thanks and really appreciate the effort on SDN4 and OGM. – user1838830 Jul 01 '15 at 18:27
  • Yes, should be able to drop those three. Stackoverflow is fine, and so is Jira- we will reclassify the issue if it's not a bug and a feature request instead. On the breaking changes, since you're working with a snapshot, it's a work in progress and can change from day to day. Any breaking changes will be documented upon a release. – Luanne Jul 02 '15 at 03:20