An attempt was made to call a method that does not exist. The attempt was made from the following

本文涉及的产品
云原生网关 MSE Higress,422元/月
服务治理 MSE Sentinel/OpenSergo,Agent数量 不受限
注册配置 MSE Nacos/ZooKeeper,118元/月
简介: An attempt was made to call a method that does not exist. The attempt was made from the following

spring boot 整合 duboo+zookeeper报错信息如下:

org.apache.curator.utils.DefaultZookeeperFactory.newZooKeeper

***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
    org.apache.curator.utils.DefaultZookeeperFactory.newZooKeeper(DefaultZookeeperFactory.java:29)
The following method did not exist:
    org.apache.zookeeper.ZooKeeper.<init>(Ljava/lang/String;ILorg/apache/zookeeper/Watcher;Z)V
The method's class, org.apache.zookeeper.ZooKeeper, is available from the following locations:
    jar:file:/D:/javaHj/maven/maven-repository/org/apache/zookeeper/zookeeper/3.3.3/zookeeper-3.3.3.jar!/org/apache/zookeeper/ZooKeeper.class
It was loaded from the following location:
    file:/D:/javaHj/maven/maven-repository/org/apache/zookeeper/zookeeper/3.3.3/zookeeper-3.3.3.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.apache.zookeeper.ZooKeeper


解决方法:

只需要在zkclient中去除zookeeper依赖


<dependency>
            <groupId>com.github.sgroschupf</groupId>
            <artifactId>zkclient</artifactId>
            <version>0.1</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.zookeeper</groupId>
                    <artifactId>zookeeper</artifactId>
                </exclusion>
            </exclusions>
        </dependency>


相关实践学习
基于MSE实现微服务的全链路灰度
通过本场景的实验操作,您将了解并实现在线业务的微服务全链路灰度能力。
目录
相关文章
|
Java Maven
An attempt was made to call a method that does not exist. The attempt was made from the following
An attempt was made to call a method that does not exist. The attempt was made from the following
454 0
|
Java 应用服务中间件
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
|
Java 测试技术
出现Error creating bean with name与CONDITIONS EVALUATION REPORT问题
出现Error creating bean with name与CONDITIONS EVALUATION REPORT问题
349 0
出现Error creating bean with name与CONDITIONS EVALUATION REPORT问题
报错解决:Reason: Failed to determine a suitable driver class
报错解决:Reason: Failed to determine a suitable driver class
2548 0
报错解决:Reason: Failed to determine a suitable driver class
|
并行计算 PyTorch 算法框架/工具
CUDA unknown error - this may be due to an incorrectly set up environment 问题解决
CUDA unknown error - this may be due to an incorrectly set up environment 问题解决
CUDA unknown error - this may be due to an incorrectly set up environment 问题解决
|
Go iOS开发
The operation couldn’t be completed. Unable to log in with account 'myappleid'. An unexpected failure occurred while logging in (Underlying error code 1100).解决方法
The operation couldn’t be completed. Unable to log in with account 'myappleid'. An unexpected failure occurred while logging in (Underlying error code 1100).解决方法
450 0
|
Java Apache
Failed to place enough replicas
如果DataNode的dfs.datanode.data.dir全配置成SSD类型,则执行“hdfs dfs -put /etc/hosts hdfs:///tmp/”时会报如下错误: 2017-05-04 16:08:22,545 WARN org.
3293 0
|
程序员 PHP 区块链
Error: the tx doesn't have the correct nonce.TestRPC/Ganache无法获取nonce
做一个truffle相关的项目,每次尝试创建交易时,总会有以下的一个错误提示: the tx doesn’t have the correct nonce 完整的一般是这样: Error: the tx doesn't have the correct nonce.
2643 0
|
Java
Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
自己新建的Maven 项目,然后通过修改 pom.xml 转为 Spring Boot 项目,出现此问题。 启动日志如下: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.
2045 0