java.lang.NoSuchMethodError: com.alibaba.nacos.common.utils.StringUtils.isBlank(Ljava/lang/String;)Z at com.alibaba.cloud.nacos.configdata.NacosConfigDataLocationResolver.getUri(NacosConfigDataLocationResolver.java:176) at com.alibaba.cloud.nacos.configdata.NacosConfigDataLocationResolver.loadConfigDataResources(NacosConfigDataLocationResolver.java:158) at com.alibaba.cloud.nacos.configdata.NacosConfigDataLocationResolver.resolveProfileSpecific(NacosConfigDataLocationResolver.java:151) at org.springframework.boot.context.config.ConfigDataLocationResolvers.lambda$resolve$2(ConfigDataLocationResolvers.java:120) at org.springframework.boot.context.config.ConfigDataLocationResolvers.resolve(ConfigDataLocationResolvers.java:126) at org.springframework.boot.context.config.ConfigDataLocationResolvers.resolve(ConfigDataLocationResolvers.java:119) at org.springframework.boot.context.config.ConfigDataLocationResolvers.resolve(ConfigDataLocationResolvers.java:107) at org.springframework.boot.context.config.ConfigDataImporter.resolve(ConfigDataImporter.java:105) at org.springframework.boot.context.config.ConfigDataImporter.resolve(ConfigDataImporter.java:97) at org.springframework.boot.context.config.ConfigDataImporter.resolveAndLoad(ConfigDataImporter.java:85) at org.springframework.boot.context.config.ConfigDataEnvironmentContributors.withProcessedImports(ConfigDataEnvironmentContributors.java:116) at org.springframework.boot.context.config.ConfigDataEnvironment.processWithProfiles(ConfigDataEnvironment.java:311) at org.springframework.boot.context.config.ConfigDataEnvironment.processAndApply(ConfigDataEnvironment.java:232) at org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor.postProcessEnvironment(ConfigDataEnvironmentPostProcessor.java:102) at org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor.postProcessEnvironment(ConfigDataEnvironmentPostProcessor.java:94) at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:102) at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:87) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:85) at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:66) at java.base/java.util.ArrayList.forEach(ArrayList.java:1378) at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120) at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:65) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:338) at org.springframework.boot.SpringApplication.run(SpringApplication.java:296) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) at cn.com.xuct.calendar.gateway.GatewayApplication.main(GatewayApplication.java:32)
原提问者GitHub用户jianhao2010303
是有这个问题
com.alibaba.nacos nacos-client 2.0.4 com.alibaba.cloud spring-cloud-starter-alibaba-nacos-config com.alibaba.nacos nacos-client
应用程序无法启动 说明:试图调用一个不存在的方法。尝试是从以下位置进行的: com.alibaba.cloud.nacos.configdata.NacosConfigDataLocationResolver.getUri(NacosConfigDataLocationResolver.java:176)
以下方法不存在: com.alibaba.nacos.common.utils.StringUtils.isBlank(Ljava/lang/String;)Z 调用方法的类com.alibaba.cloud.nacos.configdata.NacosConfigDataLocationResolver是从
以下位置加载的: jar:file:/home/workoss/.m2/repository/com/alibaba/cloud/spring-cloud-starter-alibaba-nacos-config/2021.0.1.0/spring-cloud-starter-alibaba-nacos-config-2021.0.1.0.jar!/com/alibaba/cloud/nacos/configdata/NacosConfigDataLocationResolver.class
被调用方法的类com.alibaba.nacos.commun.utils.StringUtils可从以下位置获得:
jar:file:/home/workoss/.m2/repository/com/alibaba/nacos/nacos-client/2.0.4/nacos-client-2.0.4.jar!/com/alibaba/nacos/common/utils/StringUtils.class
被调用方法的类层次结构是从以下位置加载的: com.alibaba.nacos.common.utils.StringUtils: file:/home/*/.m2/repository/com/alibaba/nacos/nacos-client/2.0.4/nacos-client-2.0.4.jar
行动:
更正应用程序的类路径,使其包含类com.alibaba.cloud.nacos.configdata.NacosConfigDataLocationResolver和com.alibabb.naco.common.utils.StringUtils的兼容版本
原回答者GitHub用户ossworker
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。