SDN 4 - InProcessServer broken in snapshot build

你离开我真会死。 提交于 2019-12-02 07:13:44

问题


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.


回答1:


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>


来源:https://stackoverflow.com/questions/31137728/sdn-4-inprocessserver-broken-in-snapshot-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!