gpt4 book ai didi

neo4j - SDN4 : Recent snapshot build broken

转载 作者:行者123 更新时间:2023-12-01 15:00:52 25 4
gpt4 key购买 nike

刚开始在启动服务器时遇到以下异常:

Error creating bean with name 'myRepository': Invocation of init method failed;  nested exception is java.lang.NoClassDefFoundError: org/springframework/data/mapping/context/InvalidPersistentPropertyPath: org.springframework.data.mapping.context.InvalidPersistentPropertyPath

哪些变化可能导致此异常?

谢谢。

最佳答案

我正在使用 Gradle,并且遇到了完全相同的问题。

InvalidPersistentPropertyPath 似乎已在 spring-data-commons 的最新 SNAPSHOT 版本(1.11.0.BUILD-SNAPSHOT)中引入。我的项目还包括 Spring Data JPA,它依赖于更稳定的版本(1.11.0.M1)。 Gradle 做了一些冲突解决并使用了 M1 库,该库没有新类并导致了 NoClassDefFoundError

目前,我正在通过告诉 Gradle 忽略 spring-data-commons 作为 JPA 的传递依赖项来解决这个问题,以便使用 SNAPSHOT 构建作为 SDN 的传递依赖项拉入:

compile("org.springframework.data:spring-data-jpa:$springDataJpaVersion") {
exclude group: "org.springframework.data", module: "spring-data-commons"
}

如果您使用 Gradle,您可以使用以下方法检查冲突:

./gradlew <project>:dependencies

我认为检查每个项目的发布时间表是值得的,但这种解决方法不允许我们继续构建。

关于neo4j - SDN4 : Recent snapshot build broken,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31409858/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com