开发者社区 > 云原生 > 正文

dubbo 3.0.8 出现重复的class,注册中心使用nacos

dubbo 3.0.8 出现重复的class,注册中心使用nacos

2022-06-28 20:03:57.718 ERROR 95464 --- [ restartedMain] org.apache.dubbo.common.Version : [DUBBO] Duplicate class org/apache/dubbo/remoting/exchange/Exchangers.class in 2 jar [file:/Users/docker/.m2/repository/org/apache/dubbo/dubbo/3.0.8/dubbo-3.0.8.jar!/org/apache/dubbo/remoting/exchange/Exchangers.class, file:/Users/docker/.m2/repository/org/apache/dubbo/dubbo-remoting-api/3.0.8/dubbo-remoting-api-3.0.8.jar!/org/apache/dubbo/remoting/exchange/Exchangers.class], dubbo version: 3.0.8, current host: 192.168.56.1 2022-06-28 20:03:57.726 ERROR 95464 --- [ restartedMain] org.apache.dubbo.common.Version : [DUBBO] Duplicate class org/apache/dubbo/remoting/Transporters.class in 2 jar [file:/Users/docker/.m2/repository/org/apache/dubbo/dubbo/3.0.8/dubbo-3.0.8.jar!/org/apache/dubbo/remoting/Transporters.class, file:/Users/docker/.m2/repository/org/apache/dubbo/dubbo-remoting-api/3.0.8/dubbo-remoting-api-3.0.8.jar!/org/apache/dubbo/remoting/Transporters.class], dubbo version: 3.0.8, current host: 192.168.56.1 2022-06-28 20:03:57.726 ERROR 95464 --- [ restartedMain] org.apache.dubbo.common.Version : [DUBBO] Duplicate class org/apache/dubbo/remoting/RemotingException.class in 2 jar [file:/Users/docker/.m2/repository/org/apache/dubbo/dubbo-remoting-api/3.0.8/dubbo-remoting-api-3.0.8.jar!/org/apache/dubbo/remoting/RemotingException.class, file:/Users/docker/.m2/repository/org/apache/dubbo/dubbo/3.0.8/dubbo-3.0.8.jar!/org/apache/dubbo/remoting/RemotingException.class], dubbo version: 3.0.8, current host: 192.168.56.1

2022-06-28 20:03:51.530 ERROR 95464 --- [ restartedMain] org.apache.dubbo.common.Version : [DUBBO] Duplicate class org/apache/dubbo/common/Version.class in 2 jar [file:/Users/docker/.m2/repository/org/apache/dubbo/dubbo/3.0.8/dubbo-3.0.8.jar!/org/apache/dubbo/common/Version.class, file:/Users/docker/.m2/repository/org/apache/dubbo/dubbo-common/3.0.8/dubbo-common-3.0.8.jar!/org/apache/dubbo/common/Version.class], dubbo version: 3.0.8, current host: 192.168.56.1

dubbo-registry-nacos模块需要禁止dubbo-registry-api和dubbo-common传递

原提问者GitHub用户zhaoyunxing92

展开
收起
有问必答 2023-05-11 18:58:08 258 0
1 条回答
写回答
取消 提交回答
  • 这个是整体打包的问题,只要用了 fatjar,所有类都会多一份,所以除非全部都变成 optional 不然没法处理

    原回答者GitHub用户AlbumenJ

    2023-05-12 10:36:09
    赞同 展开评论 打赏

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
Dubbo开源现状与2.7规划 立即下载
Dubbo分布式服务治理实战 立即下载
《Dubbo 3.0 前瞻》 立即下载