NutzCN Logo
问答 feign-client报错
发布于 2324天前 作者 qq_5e34e824 1550 次浏览 复制 上一个帖子 下一个帖子
标签:

老大,我安装这个DEMO,https://gitee.com/nutz/nutzboot/tree/dev/nutzboot-demo/nutzboot-demo-cloud
跑起来
Application AMIs Availability Zones Status
EUREKA n/a 1 1 DESKTOP-9SERSFV
FEIGN-CLIENT n/a 1 1 10.0.0.52:feign-client:8082
FEIGN-SERVICE n/a 1 1 10.0.0.52:feign-service:8083

最后这个链接报错了
http://localhost:8082/user/apitest

报错信息是
org.nutz.ioc.IocException: IocBean[userModule] throw Exception when creating
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.nutz.mvc.WhaleFilter.doFilter(WhaleFilter.java:171)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:215)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:531)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/netflix/niws/loadbalancer/DiscoveryEnabledNIWSServerList
at org.nutz.boot.starter.feign.FeignStarter.afterBorn(FeignStarter.java:153)
at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:81)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:117)
... 45 more
Caused by: java.lang.NoClassDefFoundError: com/netflix/niws/loadbalancer/DiscoveryEnabledNIWSServerList
at org.nutz.boot.starter.feign.FeignStarter.getLoadBalancer(FeignStarter.java:283)
at org.nutz.boot.starter.feign.FeignStarter.getClient(FeignStarter.java:245)
at org.nutz.boot.starter.feign.FeignStarter.afterBorn(FeignStarter.java:121)
... 47 more
Caused by: java.lang.ClassNotFoundException: com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 50 more

9 回复

已更新, 取一下最新版

Instances currently registered with Eureka
Application AMIs Availability Zones Status
EUREKA n/a 1 1 DESKTOP-9SERSFV
FEIGN-CLIENT n/a 2 2 10.0.0.52:feign-client:8085 , 10.0.0.52:feign-client:8082
FEIGN-SERVICE n/a 1 1 10.0.0.52:feign-service:8083

停掉服务后,FEIGN-CLIENT一直还在

要等的,并不能立马删除


nutzboot-demo-cloud
org.nutz
2.3-SNAPSHOT

2.3-SNAPSHOT 这个标红,老大

发代码发日志用 "插入代码" 按钮

	<parent>
		<artifactId>nutzboot-demo-cloud</artifactId>
		<groupId>org.nutz</groupId>
		<version>2.3-SNAPSHOT</version>
	</parent>

得整个nutzboot-demo导入才不会爆红

搞定啦,谢老大

添加回复
请先登陆
回到顶部