apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.5k stars 26.43k forks source link

Dubbo升级到2.7.10,报错:compatible version of org.apache.curator.framework.api.CreateBuilder #7658

Closed fxbyun closed 3 years ago

fxbyun commented 3 years ago

Environment

Steps to reproduce this issue

各种版本: dubbo-spring-boot-starter:2.7.10 zookeeper:3.4.9 curator-recipes:2.12.0

报错信息: image

已经尝试将curator-recipes:2.12.0 升级到 4.0.1或者4.1.0,然后排除掉Zookeper依赖,依然报错,不过是NoClassDefFoundError错误

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps?

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!
JayeShen commented 3 years ago

我也遇到同样的错误,不过我解决了依赖冲突,你可以试一下

org.apache.dubbo dubbo 2.7.10
<dependency>
    <groupId>org.apache.zookeeper</groupId>
    <artifactId>zookeeper</artifactId>
    <version>3.4.6</version>
</dependency>
<dependency>
    <groupId>org.apache.curator</groupId>
    <artifactId>curator-framework</artifactId>
    <version>4.2.0</version>
</dependency>
<dependency>
    <groupId>org.apache.curator</groupId>
    <artifactId>curator-recipes</artifactId>
    <version>4.2.0</version>
</dependency>
<dependency>
    <groupId>org.apache.curator</groupId>
    <artifactId>curator-x-discovery</artifactId>
    <version>4.0.1</version>
</dependency>
fxbyun commented 3 years ago

我也遇到同样的错误,不过我解决了依赖冲突,你可以试一下

org.apache.dubbo dubbo 2.7.10

org.apache.zookeeper zookeeper 3.4.6

org.apache.curator curator-framework 4.2.0

org.apache.curator curator-recipes 4.2.0

org.apache.curator curator-x-discovery 4.0.1

可以用,非常感谢,但是产生了另一个问题,当配置多个zk的时候,会启动失败: image image

报错信息: A component required a bean named 'zk1' that could not be found.

xiaoheng1 commented 3 years ago

@fxbyun can you provider a demo ?

fxbyun commented 3 years ago

@fxbyun can you provider a demo ?

我也遇到同样的错误,不过我解决了依赖冲突,你可以试一下

org.apache.dubbo dubbo 2.7.10

org.apache.zookeeper zookeeper 3.4.6

org.apache.curator curator-framework 4.2.0

org.apache.curator curator-recipes 4.2.0

org.apache.curator curator-x-discovery 4.0.1

可以了,“A component required a bean named 'zk1' that could not be found.”这个问题是测试环境的问题,按照你方式可以完美解决

fxbyun commented 3 years ago

@fxbyun can you provider a demo ?

已经解决了,谢谢!

JayeShen commented 3 years ago

@fxbyun can you provider a demo ?

想问一下,dubbo2.7.10之后是准备都使用curator4.x.x的包了吗?