这篇文章上次修改于 2103 天前,可能其部分内容已经发生变化,如有疑问可询问作者。 >java启动报错java.lang.ClassNotFoundException: org.jboss.netty.channel.ChannelFactory ,这个是因为依赖的netty没有引入过来,最新的4。0版本是nettyall,不兼容,必须使用netty,3.6版本 [1] 添加maven ```xml io.netty netty 3.6.10.Final ``` [2]补充全部报错信息 ``` bash Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tv.rr.comment.feign.UserService': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/jboss/netty/channel/ChannelFactory at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:178) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:101) at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1644) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1174) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:257) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251) at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1322) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1288) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1098) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:581) ... 91 common frames omitted Caused by: java.lang.NoClassDefFoundError: org/jboss/netty/channel/ChannelFactory at com.alibaba.dubbo.remoting.transport.netty.NettyTransporter.bind(NettyTransporter.java:33) at com.alibaba.dubbo.remoting.Transporter$Adpative.bind(Transporter$Adpative.java) at com.alibaba.dubbo.remoting.Transporters.bind(Transporters.java:48) at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchanger.bind(HeaderExchanger.java:41) at com.alibaba.dubbo.remoting.exchange.Exchangers.bind(Exchangers.java:63) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.createServer(DubboProtocol.java:329) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.openServer(DubboProtocol.java:308) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.export(DubboProtocol.java:258) at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:56) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:55) at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java) at com.alibaba.dubbo.registry.integration.RegistryProtocol.doLocalExport(RegistryProtocol.java:153) at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:107) at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:54) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:53) at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java) at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:489) at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:285) at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:246) at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:145) at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:110) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:406) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:886) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) at org.springframework.cloud.context.named.NamedContextFactory.createContext(NamedContextFactory.java:117) at org.springframework.cloud.context.named.NamedContextFactory.getContext(NamedContextFactory.java:85) at org.springframework.cloud.context.named.NamedContextFactory.getInstance(NamedContextFactory.java:126) at org.springframework.cloud.sleuth.instrument.web.client.feign.TraceFeignContext.getInstance(TraceFeignContext.java:45) at org.springframework.cloud.openfeign.FeignClientFactoryBean.get(FeignClientFactoryBean.java:205) at org.springframework.cloud.openfeign.FeignClientFactoryBean.feign(FeignClientFactoryBean.java:84) at org.springframework.cloud.openfeign.FeignClientFactoryBean.getObject(FeignClientFactoryBean.java:233) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:171) ... 102 common frames omitted Caused by: java.lang.ClassNotFoundException: org.jboss.netty.channel.ChannelFactory at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 139 common frames omitted ```
没有评论