我在一台机器上得到了`noclassdeffounderror`
我已经将NetTy项目打包为JAR,并且在本地和一台服务器上正常工作,但是它会抛出java.lang.noclassdeffounderror
在另一台服务器上例外。此外,如果我使用JRE而不是JAVA
带有JDK(同一版本)的JRE 启动JAR,则可以再次起作用。
如果此罐子在某个地方工作,则意味着罐子已经包装了所需的类,那么可能会导致问题呢?
2022-06-30 10:58:11 WARN [io.netty.channel.DefaultChannelPipeline] : An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.NoClassDefFoundError: Could not initialize class com.baidu.bjf.remoting.protobuf.utils.JDKCompilerHelper
at com.baidu.bjf.remoting.protobuf.ProtobufProxy.doCreate(ProtobufProxy.java:397)
at com.baidu.bjf.remoting.protobuf.ProtobufProxy.create(ProtobufProxy.java:311)
at com.baidu.bjf.remoting.protobuf.ProtobufProxy.create(ProtobufProxy.java:276)
at com.baidu.bjf.remoting.protobuf.ProtobufProxy.create(ProtobufProxy.java:249)
at com.baidu.bjf.remoting.protobuf.ProtobufProxy.create(ProtobufProxy.java:208)
at com.wjserver.ws.codec.ProtobufDecoder.decode(ProtobufDecoder.java:23)
at com.wjserver.ws.codec.ProtobufDecoder.decode(ProtobufDecoder.java:40)
at com.wjserver.ws.handler.WebSocketInHandler.channelRead0(WebSocketInHandler.java:41)
...
I have packaged my netty project as a jar, and it works fine locally and on one server, but it will throw java.lang.NoClassDefFoundError
exception on another one. Furthermore, if I start the jar with java
from jre instead of java
comes with jdk (same version), it works again.
If this jar works somewhere, it means the jar has already had the required classes packaged, then what might cause the problem?
2022-06-30 10:58:11 WARN [io.netty.channel.DefaultChannelPipeline] : An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.NoClassDefFoundError: Could not initialize class com.baidu.bjf.remoting.protobuf.utils.JDKCompilerHelper
at com.baidu.bjf.remoting.protobuf.ProtobufProxy.doCreate(ProtobufProxy.java:397)
at com.baidu.bjf.remoting.protobuf.ProtobufProxy.create(ProtobufProxy.java:311)
at com.baidu.bjf.remoting.protobuf.ProtobufProxy.create(ProtobufProxy.java:276)
at com.baidu.bjf.remoting.protobuf.ProtobufProxy.create(ProtobufProxy.java:249)
at com.baidu.bjf.remoting.protobuf.ProtobufProxy.create(ProtobufProxy.java:208)
at com.wjserver.ws.codec.ProtobufDecoder.decode(ProtobufDecoder.java:23)
at com.wjserver.ws.codec.ProtobufDecoder.decode(ProtobufDecoder.java:40)
at com.wjserver.ws.handler.WebSocketInHandler.channelRead0(WebSocketInHandler.java:41)
...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论