java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/noear/socketd/utils/Utils
at org.smartboot.http.server.impl.HttpMessageProcessor.process0(HttpMessageProcessor.java:81)
at org.smartboot.http.server.impl.HttpMessageProcessor.process0(HttpMessageProcessor.java:42)
at org.smartboot.socket.extension.processor.AbstractMessageProcessor.process(AbstractMessageProcessor.java:79)
at org.smartboot.socket.transport.TcpAioSession.signalRead(TcpAioSession.java:308)
at org.smartboot.socket.transport.TcpAioSession.readCompleted(TcpAioSession.java:280)
at org.smartboot.socket.transport.TcpAioSession$1.completed(TcpAioSession.java:66)
at org.smartboot.socket.transport.TcpAioSession$1.completed(TcpAioSession.java:62)
at org.smartboot.socket.enhance.EnhanceAsynchronousServerChannel.doRead(EnhanceAsynchronousServerChannel.java:281)
at org.smartboot.socket.enhance.EnhanceAsynchronousChannelGroup.lambda$new$0(EnhanceAsynchronousChannelGroup.java:76)
at org.smartboot.socket.enhance.EnhanceAsynchronousChannelGroup$Worker.run(EnhanceAsynchronousChannelGroup.java:208)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: org/noear/socketd/utils/Utils
at org.noear.solon.net.websocket.HandshakeImpl.<init>(HandshakeImpl.java:26)
at org.noear.solon.net.websocket.WebSocketBase.init(WebSocketBase.java:27)
at org.noear.solon.boot.smarthttp.websocket.WebSocketImpl.<init>(WebSocketImpl.java:23)
at org.noear.solon.boot.smarthttp.websocket.SmWebSocketHandleImpl.onHandShake(SmWebSocketHandleImpl.java:26)
at org.smartboot.http.server.handler.WebSocketDefaultHandler.whenHeaderComplete(WebSocketDefaultHandler.java:33)
at org.smartboot.http.server.WebSocketHandler.onHeaderComplete(WebSocketHandler.java:75)
at org.smartboot.http.server.WebSocketHandler.onHeaderComplete(WebSocketHandler.java:34)
at org.smartboot.http.server.impl.HttpMessageProcessor.doHttpHeader(HttpMessageProcessor.java:231)
at org.smartboot.http.server.impl.HttpMessageProcessor.process0(HttpMessageProcessor.java:55)
... 12 more
说明
graphql-solon-plugin
插件在适配websocket
时采用smarthttp
,建立websocket连接时报错错误信息:
pom中引入情况:
排查
最终发现
solon.net
中对org.noear.socketd
引入是provided
的,为什么会这样?如果是必须的jar包,它的引入方式不应该是provided
的,难道是为了减少最终包的体积?