谁来帮俺解决一下,百度一上午了:Failed to call onClose method of POJO end point for POJO of type

dishuipinganye 发布于 2017/03/15 15:01
阅读 8K+
收藏 0

三月 15, 2017 10:46:48 上午 org.apache.tomcat.websocket.pojo.PojoEndpointBase onClose
严重: Failed to call onClose method of POJO end point for POJO of type [com.zhixun.mobile.modules.dadu.socket.DaduFrontWebSocket]
java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor760.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tomcat.websocket.pojo.PojoEndpointBase.onClose(PojoEndpointBase.java:107)
    at org.apache.tomcat.websocket.WsSession.fireEndpointOnClose(WsSession.java:514)
    at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:496)
    at org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:348)
    at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:290)
    at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:131)
    at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:67)
    at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler$WsReadListener.onDataAvailable(WsHttpUpgradeHandler.java:204)
    at org.apache.coyote.http11.upgrade.AbstractServletInputStream.onDataAvailable(AbstractServletInputStream.java:203)
    at org.apache.coyote.http11.upgrade.AbstractProcessor.upgradeDispatch(AbstractProcessor.java:93)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:621)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalStateException: The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state for called method
    at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1206)
    at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.textStart(WsRemoteEndpointImplBase.java:1169)
    at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:194)
    at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:37)
    at com.zhixun.mobile.modules.dadu.socket.DaduFrontWebSocket.sendMessage(DaduFrontWebSocket.java:254)
    at com.zhixun.mobile.modules.dadu.socket.DaduFrontWebSocket.onClose(DaduFrontWebSocket.java:200)
    ... 20 more

加载中
0
noseew
noseew

问得好,竟然没有人回答,找到原因了吗?我也想问

0
彩虹糖1993
彩虹糖1993

我今天也遇到这个原因了,因为我在onclose方法里面调用了session.close()这个方法,所以出错了,貌似框架内部已经自己实现 关闭的逻辑,不用自己调用了,我不知道你是不是因为这个出错的,我反正是因为这个出错的

0
炎黄伙哥
炎黄伙哥

看异常信息是因为连接正在写数据的过程中调用了onClose导致的

OSCHINA
登录后可查看更多优质内容
返回顶部
顶部