GraphQueryLookupStrategy.resolveQuery exception on migration from SDN 4.0 to SDN 4.1.RC1

天涯浪子 提交于 2019-12-01 09:31:46

Okay, so if you run into this issue there is a pretty straight forward way to resolve it. Please see the documentation at http://projects.spring.io/spring-data/ . This exception was caused by version conflicts with the spring data commons module. The interface that neo4j implements in version 4.1.0.RC1 has changed and thus this exception is thrown.

To Resolve use the Spring Data release train BOM and set it to release Hopper-RC1 . Since I use gradle the instructions are below but you can also find them at the link above.

Relevant build script simplified...

buildscript {
  dependencies {
    classpath "io.spring.gradle:dependency-management-plugin:0.4.0.RELEASE"
  }
}

apply plugin: "io.spring.dependency-management"

dependencyManagement {
  imports {
    mavenBom 'org.springframework.data:spring-data-releasetrain:Hopper-RC1'
  }
}

dependencies {
    compile 'org.springframework.data:spring-data-neo4j:4.1.0.RC1'
}repositories {
    maven {
        url 'https://repo.spring.io/libs-milestone'
    }
}

Cheers,

Steve

Expanding on @Holycowzer's answer for Maven users. Add the following line to your builds POM.xml. Note that this is will sit outside of your main <dependencies /> tag set.

<dependencyManagement>
  <dependencies>
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-releasetrain</artifactId>
        <version>Hopper-SR1</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

I noticed some imports broke while doing this, simply add them explicitly as dependencies in your POM and everything should work as expected.

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