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
这个是整体打包的问题,只要用了 fatjar,所有类都会多一份,所以除非全部都变成 optional 不然没法处理
原回答者GitHub用户AlbumenJ
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。