除了升级tomcat版本外,还能怎么解决?

时间:2022-11-30 19:40:09
信息: Starting ProtocolHandler ["ajp-bio-8013"]
五月 26, 2016 6:07:49 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 20001 ms
2016-05-26 18:07:49 [org.springframework.web.socket.sockjs.transport.handler.DefaultSockJsService]-[DEBUG] GET http://localhost:8084/ServiceInvoker//sockjs/echo/info?t=1464257251690
2016-05-26 18:07:49 [org.springframework.web.socket.sockjs.transport.handler.DefaultSockJsService]-[DEBUG] GET http://localhost:8084/ServiceInvoker//sockjs/echo/info?t=1464257262544
2016-05-26 18:07:49 [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[DEBUG] Returning cached instance of singleton bean 'sqlSessionFactory'
2016-05-26 18:07:49 [org.springframework.web.socket.server.support.DefaultHandshakeHandler]-[TRACE] Processing request http://localhost:8084/ServiceInvoker//sockjs/echo/568/joxchk5z/websocket with headers={upgrade=[websocket], connection=[Upgrade], host=[localhost:8084], origin=[http://new-ag.99bill.com:8083], pragma=[no-cache], cache-control=[no-cache], sec-websocket-key=[UZEfdbhFERtCMp7fijWiFw==], sec-websocket-version=[13], sec-websocket-extensions=[x-webkit-deflate-frame], user-agent=[Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36], cookie=[JSESSIONID=3FB3ACCD04FF39AECB8756D658D1C15E]}
2016-05-26 18:07:49 [org.springframework.web.socket.sockjs.transport.session.WebSocketServerSockJsSession]-[DEBUG] Closing due to transport error for WebSocketServerSockJsSession[id=joxchk5z]
2016-05-26 18:07:49 [org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator]-[DEBUG] Transport error in WebSocketServerSockJsSession[id=joxchk5z]
java.lang.IncompatibleClassChangeError: Class org.apache.tomcat.websocket.server.WsServerContainer does not implement the requested interface javax.websocket.WebSocketContainer
at org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy.getInstalledExtensions(AbstractStandardUpgradeStrategy.java:95)
at org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy.getSupportedExtensions(AbstractStandardUpgradeStrategy.java:88)
at org.springframework.web.socket.server.support.DefaultHandshakeHandler.doHandshake(DefaultHandshakeHandler.java:214)
at org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler.handleRequest(WebSocketTransportHandler.java:80)
at org.springframework.web.socket.sockjs.transport.TransportHandlingSockJsService.handleTransportRequest(TransportHandlingSockJsService.java:272)
at org.springframework.web.socket.sockjs.support.AbstractSockJsService.handleRequest(AbstractSockJsService.java:407)
at org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler.handleRequest(SockJsHttpRequestHandler.java:90)
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
五月 26, 2016 6:07:49 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [spring] in context with path [/ServiceInvoker] threw exception [Request processing failed; nested exception is org.springframework.web.socket.sockjs.SockJsException: Uncaught failure in SockJS request, uri=http://localhost:8084/ServiceInvoker//sockjs/echo/568/joxchk5z/websocket; nested exception is org.springframework.web.socket.sockjs.SockJsTransportFailureException: WebSocket handshake failure; nested exception is java.lang.IncompatibleClassChangeError: Class org.apache.tomcat.websocket.server.WsServerContainer does not implement the requested interface javax.websocket.WebSocketContainer] with root cause
java.lang.IncompatibleClassChangeError: Class org.apache.tomcat.websocket.server.WsServerContainer does not implement the requested interface javax.websocket.WebSocketContainer
at org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy.getInstalledExtensions(AbstractStandardUpgradeStrategy.java:95)
at org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy.getSupportedExtensions(AbstractStandardUpgradeStrategy.java:88)
at org.springframework.web.socket.server.support.DefaultHandshakeHandler.doHandshake(DefaultHandshakeHandler.java:214)
at org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler.handleRequest(WebSocketTransportHandler.java:80)
at org.springframework.web.socket.sockjs.transport.TransportHandlingSockJsService.handleTransportRequest(TransportHandlingSockJsService.java:272)
at org.springframework.web.socket.sockjs.support.AbstractSockJsService.handleRequest(AbstractSockJsService.java:407)
at org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler.handleRequest(SockJsHttpRequestHandler.java:90)
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)


2016-05-26 18:07:50 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler]-[DEBUG] POST http://localhost:8084/ServiceInvoker//sockjs/echo/568/ph2i1154/xhr_streaming?t=1464257270617
2016-05-26 18:07:50 [org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator]-[DEBUG] New XhrStreamingSockJsSession[id=ph2i1154]
2016-05-26 18:07:50 [cn.sh.ideal.websocket.handler.SocketHandler]-[INFO] afterConnectionEstablished, threadCount = 1sessionId = ph2i1154
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] 1 message(s) to flush in session ph2i1154
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] Session is not active, not ready to flush.
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] Preparing to write SockJsFrame content='o'
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] Writing to HTTP response: o


2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] Preparing to write SockJsFrame content='a["{\"clientId\":\"ph2i1154\",\"done\":false,\"isReceipt\":\"0\",\"requestType\"...(truncated)'
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] Writing to HTTP response: a["{\"clientId\":\"ph2i1154\",\"done\":false,\"isReceipt\":\"0\",\"requestType\":\"4\",\"sentCount\":1,\"serverMessageId\":\"6\",\"wait\":true,\"waitCount\":0}"]


2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] 162 bytes written so far, 0 more messages not flushed
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] Scheduled heartbeat in session ph2i1154
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrReceivingTransportHandler]-[TRACE] Received message(s): [{"content":{"tenantCode":"6000","logoType":"1"},"messageType":"logoQuery","messageCallback":null,"requestType":"1","isReceipt":"1","clientMessageId":"146425727118417","clientId":"14642569290549183"}]
2016-05-26 18:07:51 [org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator]-[TRACE] Handling TextMessage payload=[{"content"..], byteCount=198, last=true] in XhrStreamingSockJsSession[id=ph2i1154]
2016-05-26 18:07:51 [cn.sh.ideal.websocket.handler.SocketHandler]-[INFO] Received: {"content":{"tenantCode":"6000","logoType":"1"},"messageType":"logoQuery","messageCallback":null,"requestType":"1","isReceipt":"1","clientMessageId":"146425727118417","clientId":"14642569290549183"}
2016-05-26 18:07:51 [cn.sh.ideal.websocket.util.NetUtil]-[INFO] Request[http://192.168.47.220:20005/ContentManageSystem/logo/query?port=8084] params[{"logoType":"1","tenantCode":"6000"}]
2016-05-26 18:07:51 [cn.sh.ideal.websocket.util.NetUtil]-[INFO] Response[http://192.168.47.220:20005/ContentManageSystem/logo/query?port=8084] result[{"data":[],"resultCode":"0","resultMsg":"success."}]
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] 1 message(s) to flush in session ph2i1154
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] Session is active, ready to flush.
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] Cancelling heartbeat in session ph2i1154
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] Preparing to write SockJsFrame content='a["{\"clientId\":\"14642569290549183\",\"clientMessageId\":\"146425727118417\",\...(truncated)'
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] Writing to HTTP response: a["{\"clientId\":\"14642569290549183\",\"clientMessageId\":\"146425727118417\",\"content\":{\"data\":[],\"resultCode\":\"0\",\"resultMsg\":\"success.\"},\"done\":false,\"isReceipt\":\"1\",\"requestType\":\"1\",\"sentCount\":1,\"serverMessageId\":\"146425727118417\",\"wait\":true,\"waitCount\":0}"]


2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] 461 bytes written so far, 0 more messages not flushed
2016-05-26 18:07:51 [org.springframework.web.socket.sockjs.transport.handler.XhrStreamingTransportHandler$XhrStreamingSockJsSession]-[TRACE] Scheduled heartbeat in session ph2i1154

2016-05-26 18:07:52 [cn.sh.ideal.websocket.handler.SocketHandler]-[INFO] execute timer task!




解决方案:jar包冲突,删除项目中的javax.websocket-client-api-1.1 .jar即可!