gpt4 book ai didi

java.lang.NoSuchMethodError : org. springframework.util.ReflectionUtils.clearCache()V

转载 作者:行者123 更新时间:2023-11-30 02:14:36 24 4
gpt4 key购买 nike

我收到上述错误。经过一番谷歌搜索后,我发现问题出在依赖项上。所以我运行 mvn dependency:tree 命令并得到以下输出 -

INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ dubbo-test ---
[INFO] com.privacera.dubbo:dubbo-test:jar:1.0-SNAPSHOT
[INFO] +- com.alibaba.boot:dubbo-spring-boot-starter:jar:1.0.0-SNAPSHOT:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.3.0.RELEASE:true
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.3.0.RELEASE:runtime
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.1.3:runtime
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.1.3:runtime
[INFO] | | | +- org.slf4j:jcl-over-slf4j:jar:1.7.13:runtime
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.13:runtime
[INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.13:runtime
[INFO] | | +- org.springframework:spring-core:jar:4.2.3.RELEASE:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.16:runtime
[INFO] | +- com.alibaba:dubbo:jar:2.5.9:compile
[INFO] | | +- org.springframework:spring-context:jar:4.3.10.RELEASE:compile
[INFO] | | | +- org.springframework:spring-aop:jar:4.3.10.RELEASE:compile
[INFO] | | | \- org.springframework:spring-expression:jar:4.3.10.RELEASE:compile
[INFO] | | +- org.springframework:spring-beans:jar:4.3.10.RELEASE:compile
[INFO] | | +- org.springframework:spring-web:jar:4.3.10.RELEASE:compile
[INFO] | | +- org.javassist:javassist:jar:3.20.0-GA:compile
[INFO] | | \- org.jboss.netty:netty:jar:3.2.5.Final:compile
[INFO] | +- org.apache.zookeeper:zookeeper:jar:3.4.9:compile
[INFO] | | +- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO] | | +- log4j:log4j:jar:1.2.16:compile
[INFO] | | +- jline:jline:jar:0.9.94:compile
[INFO] | | \- io.netty:netty:jar:3.10.5.Final:compile
[INFO] | +- org.apache.curator:curator-framework:jar:2.12.0:compile
[INFO] | | \- org.apache.curator:curator-client:jar:2.12.0:compile
[INFO] | | \- com.google.guava:guava:jar:16.0.1:compile
[INFO] | +- com.alibaba.boot:dubbo-spring-boot-autoconfigure:jar:1.0.0-SNAPSHOT:compile
[INFO] | \- com.alibaba.boot:dubbo-spring-boot-actuator:jar:1.0.0-SNAPSHOT:compile
[INFO] \- org.springframework.boot:spring-boot-autoconfigure:jar:1.3.3.RELEASE:compile
[INFO] \- org.springframework.boot:spring-boot:jar:1.3.3.RELEASE:compile

但我无法理解哪个依赖项存在冲突。以下是我的pom.xml的内容

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.vector.dubbo</groupId>
<artifactId>dubbo-test</artifactId>
<version>1.0-SNAPSHOT</version>

<dependencies>
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>1.3.3.RELEASE</version>
</dependency>


</dependencies>

<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

</project>

最佳答案

我看到有2个Spring Boot版本1.3.3和1.3.0(来自alibaba starter)。排除其中任何一个并重试。希望这能解决您的问题。

关于java.lang.NoSuchMethodError : org. springframework.util.ReflectionUtils.clearCache()V,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48995535/

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