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实现微服务的全链路灰度
通过本场景的实验操作,您将了解并实现在线业务的微服务全链路灰度能力。
目录
相关文章
|
Serverless
attempt to delete a method
attempt to delete a method
222 1
getReader() has already been called for this request
getReader() has already been called for this request
1689 0
getReader() has already been called for this request
|
资源调度
There appears to be trouble with your network connection.Retrying
There appears to be trouble with your network connection.Retrying
2039 0
There appears to be trouble with your network connection.Retrying
|
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
486 0
|
XML Java 数据格式
Exception encountered during context initialization - cancelling refresh attempt
Exception encountered during context initialization - cancelling refresh attempt:
344 0
报错解决:Reason: Failed to determine a suitable driver class
报错解决:Reason: Failed to determine a suitable driver class
2568 0
报错解决:Reason: Failed to determine a suitable driver class
|
应用服务中间件
returned a response status of 405 Method Not Allowed
returned a response status of 405 Method Not Allowed
returned a response status of 405 Method Not Allowed
|
并行计算 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).解决方法
483 0