概述
项目原来用的是eureka和config做服务发现和配置中心和的,然后现在想改用nacos,服务配置完后启动报错(但启动起来了),且没有注册到nacos。
先是抛了好几次warn
2020-12-19 16:54:03.932 WARN 13212 — [ main] o.a.c.loader.WebappClassLoaderBase : The web application [ROOT] appears to have started a thread named [ForkJoinPool.commonPool-worker-5] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.ForkJoinPool.awaitWork(ForkJoinPool.java:1824)
java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1693)
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
然后报错
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
springfox.documentation.spring.web.scanners.ApiListingScanner.scan(ApiListingScanner.java:117)
The following method did not exist:
com.google.common.collect.FluentIterable.append(Ljava/lang/Iterable;)Lcom/google/common/collect/FluentIterable;
The method’s class, com.google.common.collect.FluentIterable, is available from the following locations:
jar:file:/C:/Users/ST/.m2/repository/com/google/guava/guava/15.0/guava-15.0.jar!/com/google/common/collect/FluentIterable.class
It was loaded from the following location:
file:/C:/Users/ST/.m2/repository/com/google/guava/guava/15.0/guava-15.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.google.common.collect.FluentIterable
我看了指向路径的guava包发现有很多版本
他这里说15.0有什么什么问题,所以猜想问题原因可能是某个其他包使用的低版本的guava,然后nacos用的是高版本,结果不能兼容使得nacos出错
决定手动引入高版本
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>28.1-jre</version>
</dependency>
注册成功!且无报错
最后
以上就是昏睡冰淇淋为你收集整理的SpringCloudAlibabaNacos服务实例启动后,Nacos未注册上,启动报错 com.google.common.collect.FluentIterable.append(Ljava/的全部内容,希望文章能够帮你解决SpringCloudAlibabaNacos服务实例启动后,Nacos未注册上,启动报错 com.google.common.collect.FluentIterable.append(Ljava/所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复