300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > An attempt was made to call a method that does not existThe attempt was made from following location

An attempt was made to call a method that does not existThe attempt was made from following location

时间:2023-05-22 01:54:42

相关推荐

An attempt was made to call a method that does not existThe attempt was made from following location

Dubbo和zookeeper整合springboot报错:An attempt was made to call a method that does not exist. The attempt was made from the following location(已解决)

Description:An attempt was made to call a method that does not exist. The attempt was made from the following location:org.ty4InternalESLogger.<init>(Netty4InternalESLogger.java:34)The following method did not exist:mon.logging.Loggers.getLogger(Ljava/lang/String;)Lorg/apache/logging/log4j/Logger;The method's class, mon.logging.Loggers, is available from the following locations:jar:file:/Users/admin/.m2/repository/org/elasticsearch/elasticsearch/6.8.4/elasticsearch-6.8.4.jar!/org/elasticsearch/common/logging/Loggers.classIt was loaded from the following location:file:/Users/admin/.m2/repository/org/elasticsearch/elasticsearch/6.8.4/elasticsearch-6.8.4.jar

这句话的意思是:还没有启动成功就报错了.报错原因,说jar包的位置不对,根本原因就是pom.xml文件中版本依赖有问题,比如你的项目依赖的是2.1.0版本的工程,你其他的子依赖,必须也是2.1.0!

如果你写了两个模块,那么一定要看看pom.xml上面的这段代码:

<artifactId>spring-boot-starter-parent</artifactId><version>2.2.1.RELEASE</version>

很有可能就是,底下这个版本号的问题,我原先的是3点几的,就报错了,改成这个就可以了。

下面是dubbo和zookeeper整合springboot的所有依赖,亲测可用

<?xml version="1.0" encoding="UTF-8"?><project xmlns="/POM/4.0.0" xmlns:xsi="/2001/XMLSchema-instance"xsi:schemaLocation="/POM/4.0.0 /xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.2.1.RELEASE</version><relativePath/> <!-- lookup parent from repository --></parent><groupId>com.kuang</groupId><artifactId>provider</artifactId><version>0.0.1-SNAPSHOT</version><name>provider</name><description>Demo project for Spring Boot</description><properties><java.version>1.8</java.version></properties><dependencies><!--导入依赖:Dubbo+zookeeper--><!-- /artifact/org.apache.dubbo/dubbo-spring-boot-starter --><dependency><groupId>org.apache.dubbo</groupId><artifactId>dubbo-spring-boot-starter</artifactId><version>2.7.3</version></dependency><!--zkClient--><!-- /artifact/com.github.sgroschupf/zkclient --><dependency><groupId>com.github.sgroschupf</groupId><artifactId>zkclient</artifactId><version>0.1</version></dependency><!--日志会冲突--><!--引入zookeeper--><dependency><groupId>org.apache.curator</groupId><artifactId>curator-framework</artifactId><version>2.12.0</version></dependency><dependency><groupId>org.apache.curator</groupId><artifactId>curator-recipes</artifactId><version>2.12.0</version></dependency><dependency><groupId>org.apache.zookeeper</groupId><artifactId>zookeeper</artifactId><version>3.4.14</version><exclusions><exclusion><groupId>org.slf4j</groupId><artifactId>slf4j-log4j12</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins></build></project>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。