关闭

Dubbo 启动 报 javassist/ClassPath And org/jboss/netty/channel/ChannelFactory异常

标签: dubboChannelFacjavassistDubbo报错
1588人阅读 评论(0) 收藏 举报
分类:

一. javassist/ClassPath

在使用Dubbo的时候,启动报错如下:

aused by: java.lang.IllegalStateException: Failed to load extension class(interface: interface com.alibaba.dubbo.common.compiler.Compiler, class line: com.alibaba.dubbo.common.compiler.support.JavassistCompiler) in jar:file:/F:/My_WorkSpace/repository/com/alibaba/dubbo/2.5.3/dubbo-2.5.3.jar!/META-INF/dubbo/internal/com.alibaba.dubbo.common.compiler.Compiler, cause: javassist/ClassPath
    at com.alibaba.dubbo.common.extension.ExtensionLoader.loadFile(ExtensionLoader.java:685)
    at com.alibaba.dubbo.common.extension.ExtensionLoader.loadExtensionClasses(ExtensionLoader.java:591)
    at com.alibaba.dubbo.common.extension.ExtensionLoader.getExtensionClasses(ExtensionLoader.java:567)
    at com.alibaba.dubbo.common.extension.ExtensionLoader.getAdaptiveExtensionClass(ExtensionLoader.java:728)
    at com.alibaba.dubbo.common.extension.ExtensionLoader.createAdaptiveExtension(ExtensionLoader.java:721)
    at com.alibaba.dubbo.common.extension.ExtensionLoader.getAdaptiveExtension(ExtensionLoader.java:455)
    at com.alibaba.dubbo.common.extension.ExtensionLoader.createAdaptiveExtensionClass(ExtensionLoader.java:738)
    at com.alibaba.dubbo.common.extension.ExtensionLoader.getAdaptiveExtensionClass(ExtensionLoader.java:732)
    at com.alibaba.dubbo.common.extension.ExtensionLoader.createAdaptiveExtension(ExtensionLoader.java:721)
    ... 27 more
Caused by: java.lang.NoClassDefFoundError: javassist/ClassPath
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:274)
    at com.alibaba.dubbo.common.extension.ExtensionLoader.loadFile(ExtensionLoader.java:627)
    ... 35 more

解决,缺失jar:

<!--javassist jar-->
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.18.1-GA</version>
        </dependency>

二. org/jboss/netty/channel/ChannelFactory

在使用Dubbo的时候,启动报错如下:

Exception in thread "main" 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:287)
    at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.openServer(DubboProtocol.java:266)
    at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.export(DubboProtocol.java:253)
    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:485)
    at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:281)
    at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:242)
    at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:143)
    at com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:109)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
    at com.dufy.service.ProviderServiceTest.main(ProviderServiceTest.java:21)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.ClassNotFoundException: org.jboss.netty.channel.ChannelFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 33 more

解决,Dubbo依赖Netty,添加jar:

<!--netty jar-->
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty</artifactId>
            <version>3.6.10.Final</version>
        </dependency>

欢迎访问我的csdn博客,我们一同成长!

不管做什么,只要坚持下去就会看到不一样!在路上,不卑不亢!

博客首页http://blog.csdn.net/u010648555

1
0
查看评论

Netty:JBOSS的 JAVA NIO开发开源框架

Netty是由JBOSS提供的一个java开源框架。Netty提供异步的、事件驱动的网络应用程序框架和工具,用以快速开发高性能、高可靠性的网络服务器和客户端程序。 也就是说,Netty 是一个基于NIO的客户,服务器端编程框架,使用Netty 可以确保你快速和简单的开发出一个网络应用,例如实现了某种...
  • bigtree_3721
  • bigtree_3721
  • 2016-05-13 21:21
  • 2949

ClassNotFoundException, org.jboss.netty.channel.ChannelPipelineFactory 缺少jar包

现象&异常     在开发机上,myApp web应用可以正常访问。但在daily环境可以访问index.htm,访问其他页面出现异常,浏览器内显示的异常内容为  Caused by: java.lang.NoClassDefFoundError: Could ...
  • cuidiwhere
  • cuidiwhere
  • 2014-03-03 22:18
  • 17302

ClassNotFoundException, org.jboss.netty.channel.ChannelPipelineFactory 缺少jar包【远程调用dubbo分布式服务框架遇到的问题】

文章来源:http://blog.csdn.net/cuidiwhere/article/details/20402347 现象&异常     在开发机上,myApp web应用可以正常访问。但在daily环境可以访问index.htm,...
  • buster2014
  • buster2014
  • 2015-07-09 11:53
  • 3336

常见问题2:dubbo 依赖包 javassist 版本异常

常见问题2:dubbo 依赖包 javassist 版本异常Error:dubbo启动报java.lang.ClassNotFoundException: javassist.ClassPath Reason: 在dubbo启动的过程中报错误: java.lang.ClassNotFoundExce...
  • TStana
  • TStana
  • 2017-06-09 16:07
  • 2435

Elasticsearch class: org/jboss/netty/channel/socket/nio/NioWorkerPool

打开放jar包的位置 删除多余的netty.jar包,只留一个 改根本pom.xml 删除一个 OK!
  • qq_25800733
  • qq_25800733
  • 2018-01-11 17:51
  • 91

dubbo启动报java.lang.ClassNotFoundException: javassist.ClassPath

在dubbo启动的过程中报错误:java.lang.ClassNotFoundException: javassist.ClassPath,调试发现代码:Class clazz = Class.forName(line, true, classLoader)执行加载类com.alibaba.dubb...
  • achilles12345
  • achilles12345
  • 2014-12-16 12:56
  • 27722

客户端 UDP 调用netty 参考

import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.net...
  • guotong1988
  • guotong1988
  • 2012-12-18 17:24
  • 4236

连接ElasticSearch获取客户端client时报错

连接ElasticSearch时报错 2016-12-16 17:42:21 [ main:0 ] - [ org.elasticsearch.plugins.PluginsService:180] [Rachel Summers] modules [], plugins [], sites [...
  • nature_fly088
  • nature_fly088
  • 2016-12-16 17:51
  • 3446

Netty API使用总结

Q1:服务器主动关闭连接后,客户端没有监听到socket关闭的事件。 想象中,调用org.jboss.netty.channel.Channel.close();-->GateServerHandler.closeRequested-->channelDisconnected-->...
  • jiangguilong2000
  • jiangguilong2000
  • 2012-08-13 20:25
  • 16701

What is the difference between netty(io.netty.*) and jboss netty(org.jboss.netty.*)

First, in Netty 3.X the packages were from org.jboss.netty.* see: http://netty.io/3.10/api/index.html, But started Netty 4.X the packeages are from i...
  • dotphoenix
  • dotphoenix
  • 2017-06-27 09:57
  • 1051
    个人资料
    • 访问:472604次
    • 积分:5995
    • 等级:
    • 排名:第5056名
    • 原创:169篇
    • 转载:16篇
    • 译文:0篇
    • 评论:163条
    联系方式
    博客专栏
    最新评论