开发者社区> 牧小农> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

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
+关注继续查看

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>


版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
SAP LSMW Error - You have not fully maintained the descriptions - 之分析
SAP LSMW 导入物料主数据报错 - You have not fully maintained the descriptions - 之分析 近日,笔者忙于在D项目上的主数据导入。
1931 0
Python 【精】AttributeError: 'Module' object has no attribute 'STARTF_USESHOWINDOW'
夫学须志也,才须学也,非学无以广才,非志无以成学。——诸葛亮 生活有度,自得慈铭 ——杜锦阳 今天新来的同事安装环境遇到个莫名其妙的问题: AttributeError: 'Module' obj...
1646 0
A fine property of the non-empty countable dense-in-self set in the real line
A fine property of the non-empty countable dense-in-self set in the real line   Zujin Zhang   School of Mathematics and Computer Science, Gannan Normal University Ganzhou 341000, P.
677 0
+关注
牧小农
业精于勤荒于嬉,行成于思毁于随。
134
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载