apache / dubbo

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

2.7.10 升级到 3.0.0,提示:java.lang.NoSuchMethodError: com.alibaba.nacos.api.config.ConfigService.publishConfigCas(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z #8130

Closed pangshuqiang closed 3 years ago

pangshuqiang commented 3 years ago

2.7.10 升级到 3.0.0,提示:

14:46:43.946 WARN 20144 --- [ main] o.a.d.r.c.m.MetadataServiceNameMapping.execute(MetadataServiceNameMapping.java:106) : [DUBBO] com.alibaba.nacos.api.config.ConfigService.publishConfigCas(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z, dubbo version: 3.0.0, current host: 192.168.100.2

java.lang.NoSuchMethodError: com.alibaba.nacos.api.config.ConfigService.publishConfigCas(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z at org.apache.dubbo.metadata.store.nacos.NacosConfigServiceWrapper.publishConfigCas(NacosConfigServiceWrapper.java:61) ~[dubbo-3.0.0.jar:3.0.0] at org.apache.dubbo.metadata.store.nacos.NacosMetadataReport.registerServiceAppMapping(NacosMetadataReport.java:217) ~[dubbo-3.0.0.jar:3.0.0] at org.apache.dubbo.registry.client.metadata.MetadataServiceNameMapping.lambda$map$0(MetadataServiceNameMapping.java:71) ~[dubbo-3.0.0.jar:3.0.0] at org.apache.dubbo.registry.client.metadata.MetadataServiceNameMapping.execute(MetadataServiceNameMapping.java:103) ~[dubbo-3.0.0.jar:3.0.0] at org.apache.dubbo.registry.client.metadata.MetadataServiceNameMapping.map(MetadataServiceNameMapping.java:50) ~[dubbo-3.0.0.jar:3.0.0] at org.apache.dubbo.config.ServiceConfig.lambda$exported$0(ServiceConfig.java:227) ~[dubbo-3.0.0.jar:3.0.0] at java.util.ArrayList.forEach(ArrayList.java:1540) [?:?] at org.apache.dubbo.config.ServiceConfig.exported(ServiceConfig.java:225) [dubbo-3.0.0.jar:3.0.0] at org.apache.dubbo.config.spring.ServiceBean.exported(ServiceBean.java:113) [dubbo-3.0.0.jar:3.0.0] at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:321) [dubbo-3.0.0.jar:3.0.0] at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:219) [dubbo-3.0.0.jar:3.0.0] at org.apache.dubbo.config.bootstrap.DubboBootstrap.exportServices(DubboBootstrap.java:1295) [dubbo-3.0.0.jar:3.0.0] at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:1090) [dubbo-3.0.0.jar:3.0.0] at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:70) [dubbo-3.0.0.jar:3.0.0] at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:63) [dubbo-3.0.0.jar:3.0.0] at com.alibaba.spring.context.OnceApplicationContextEventListener.onApplicationEvent(OnceApplicationContextEventListener.java:52) [spring-context-support-1.0.10.jar:?] at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) [spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404) [spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361) [spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:898) [spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554) [spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.7.RELEASE.jar:2.3.7.RELEASE]

目前是报这个提示,项目能启用能运行,有类似的吗?

Nacos2.0.2+SpringCloud

CrazyHZM commented 3 years ago

Check whether there are multiple local nacos versions.

ThunderfuryWindseeker commented 3 years ago

我也遇到了同样的问题,我这里的原因是nacos用的2.0.2版本,但是对应的nacos-api用的1.4.2版本,更新版本之后OK了

CrazyHZM commented 3 years ago

@pangshuqiang Try to converge the nacos version to solve it.