Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/371.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何定位哪些库不兼容?尝试更新spring启动时出现问题_Java_Spring_Gradle_Dependencies - Fatal编程技术网

Java 如何定位哪些库不兼容?尝试更新spring启动时出现问题

Java 如何定位哪些库不兼容?尝试更新spring启动时出现问题,java,spring,gradle,dependencies,Java,Spring,Gradle,Dependencies,有没有什么方法可以帮助我检查哪一个库不能与新的spring一起工作? 我正在尝试将项目中的spring从2.2.0.RELEASE更新为2.2.5.RELEASE 我身体的一部分,格雷德尔 dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.5.RELEASE") } 我将org.springframework.boot:spring boot gradle plugin和or

有没有什么方法可以帮助我检查哪一个库不能与新的spring一起工作? 我正在尝试将项目中的spring从2.2.0.RELEASE更新为2.2.5.RELEASE

我身体的一部分,格雷德尔

dependencies {
    classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.5.RELEASE")
}
我将org.springframework.boot:spring boot gradle plugin和org.springframework.boot更改为2.2.5.RELEASE版本后,出现以下错误:

Caused by: java.lang.IllegalArgumentException: class org.springframework.boot.cloud.CloudFoundryVcapEnvironmentPostProcessor is not assignable to interface org.springframework.context.ApplicationListener
    at org.springframework.util.Assert.assignableCheckFailed(Assert.java:673)
    at org.springframework.util.Assert.isAssignable(Assert.java:604)
    at org.springframework.util.Assert.isAssignable(Assert.java:635)
    at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:433)
    ... 16 more
当然,进程“command”C:\Program Files\Java\jdk1.8.0\u 241\bin\Java.exe“”以非零退出值1结束


我怀疑有些库是不兼容的。但是你怎么检查呢?也许你也有类似的问题。我已经尝试了许多组合

删除Spring Kafka依赖项的版本(Spring Boot可以管理这些版本)以及
org.apache.Kafka
依赖项版本。删除您使用的不同启动器中已经存在的
spring上下文
spring jms
依赖项。最后,您没有显示所有依赖项,因为您的列表中还有一些Spring云依赖项(这就是失败的原因)。
dependencies {
    compile('com.google.guava:guava:25.1-jre')
    compile('org.springframework:spring-context-support')
    compile('org.springframework.boot:spring-boot-starter-security')
    compile('org.springframework.security.oauth:spring-security-oauth2:2.3.4.RELEASE')
    compile('org.springframework.security:spring-security-jwt:1.0.9.RELEASE')
    compile('org.springframework:spring-jms')
    compile('org.springframework.boot:spring-boot-starter-activemq')
    compile('org.springframework.boot:spring-boot-starter-web')
    compile("org.springframework.kafka:spring-kafka:2.2.7.RELEASE")
    compile('org.reflections:reflections:0.9.11')
    compile('com.github.ben-manes.caffeine:caffeine')
    testCompile('org.assertj:assertj-core')
    testCompile('org.springframework.boot:spring-boot-starter-test')
    testCompile("org.springframework.kafka:spring-kafka-test:2.2.7.RELEASE")
    testCompile('org.apache.kafka:kafka-clients:2.2.0')
    testCompile('org.apache.kafka:kafka_2.12:2.2.0')
    testCompile('org.apache.kafka:kafka-clients:2.2.0:test')
    testCompile('org.apache.kafka:kafka_2.12:2.2.0:test')
}

Caused by: java.lang.IllegalArgumentException: class org.springframework.boot.cloud.CloudFoundryVcapEnvironmentPostProcessor is not assignable to interface org.springframework.context.ApplicationListener
    at org.springframework.util.Assert.assignableCheckFailed(Assert.java:673)
    at org.springframework.util.Assert.isAssignable(Assert.java:604)
    at org.springframework.util.Assert.isAssignable(Assert.java:635)
    at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:433)
    ... 16 more
Caused by: java.lang.IllegalArgumentException: class org.springframework.boot.cloud.CloudFoundryVcapEnvironmentPostProcessor is not assignable to interface org.springframework.context.ApplicationListener
Caused by: java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.context.ApplicationListener : org.springframework.boot.cloud.CloudFoundryVcapEnvironmentPostProcessor