Ошибка websocket + spring + weblogic 12.2.1.3

460
13 февраля 2018, 07:43

При переходе на новую версию weblogic (12.2.1.3) возникает ошибка при создании конекта websocket, в старой версии сокеты работают (12.1.3)

public class SpringSocketConfig extends AbstractSessionWebSocketMessageBrokerConfigurer<ExpiringSession> {
@Override
public void configureStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
    List attrnames = new ArrayList();
    attrnames.add("SESSION");
    attrnames.add("JSESSION");
    stompEndpointRegistry.addEndpoint("/infocontroller").setHandshakeHandler(new DefaultHandshakeHandler(new
            WebLogicRequestUpgradeStrategy())).withSockJS();
}
@Override
public void configureMessageBroker(MessageBrokerRegistry registry) {
    registry.enableSimpleBroker("/service/", "/queue/", "/echo", "/session");
    registry.setApplicationDestinationPrefixes("/app");
}
}
org.springframework.web.socket.sockjs.SockJsException: Uncaught failure in SockJS request, uri=https://localhost:7002/infocontroller/896/cyui40aq/websocket; nested exception is org.springframework.web.socket.sockjs.SockJsTransportFailureException: WebSocket handshake failure; nested exception is org.springframework.web.socket.server.HandshakeFailureException: Error during handshake: https://localhost:7002/infocontroller/896/cyui40aq/websocket; nested exception is org.springframework.web.socket.server.HandshakeFailureException: Failed to create TyrusMuxableWebSocket; nested exception is org.springframework.web.socket.server.HandshakeFailureException: Failed to obtain SubjectHandle; nested exception is java.lang.reflect.InvocationTargetException
at org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler.handleRequest(SockJsHttpRequestHandler.java:135)
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.web.socket.sockjs.SockJsTransportFailureException: WebSocket handshake failure; nested exception is org.springframework.web.socket.server.HandshakeFailureException: Error during handshake: https://localhost:7002/infocontroller/896/cyui40aq/websocket; nested exception is org.springframework.web.socket.server.HandshakeFailureException: Failed to create TyrusMuxableWebSocket; nested exception is org.springframework.web.socket.server.HandshakeFailureException: Failed to obtain SubjectHandle; nested exception is java.lang.reflect.InvocationTargetException
at org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler.handleRequest(WebSocketTransportHandler.java:127)
at org.springframework.web.socket.sockjs.transport.TransportHandlingSockJsService.handleTransportRequest(TransportHandlingSockJsService.java:312)
at org.springframework.web.socket.sockjs.support.AbstractSockJsService.handleRequest(AbstractSockJsService.java:433)
at org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler.handleRequest(SockJsHttpRequestHandler.java:132)
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.web.socket.server.HandshakeFailureException: Error during handshake: https://localhost:7002/infocontroller/896/cyui40aq/websocket; nested exception is org.springframework.web.socket.server.HandshakeFailureException: Failed to create TyrusMuxableWebSocket; nested exception is org.springframework.web.socket.server.HandshakeFailureException: Failed to obtain SubjectHandle; nested exception is java.lang.reflect.InvocationTargetException
at org.springframework.web.socket.server.standard.AbstractTyrusRequestUpgradeStrategy.upgradeInternal(AbstractTyrusRequestUpgradeStrategy.java:124)
at org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy.upgrade(AbstractStandardUpgradeStrategy.java:131)
at org.springframework.web.socket.server.support.AbstractHandshakeHandler.doHandshake(AbstractHandshakeHandler.java:279)
at org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler.handleRequest(WebSocketTransportHandler.java:123)
at org.springframework.web.socket.sockjs.transport.TransportHandlingSockJsService.handleTransportRequest(TransportHandlingSockJsService.java:312)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.web.socket.server.HandshakeFailureException: Failed to create TyrusMuxableWebSocket; nested exception is org.springframework.web.socket.server.HandshakeFailureException: Failed to obtain SubjectHandle; nested exception is java.lang.reflect.InvocationTargetException
at org.springframework.web.socket.server.standard.WebLogicRequestUpgradeStrategy$TyrusMuxableWebSocketHelper.newInstance(WebLogicRequestUpgradeStrategy.java:182)
at org.springframework.web.socket.server.standard.WebLogicRequestUpgradeStrategy$TyrusMuxableWebSocketHelper.access$200(WebLogicRequestUpgradeStrategy.java:139)
at org.springframework.web.socket.server.standard.WebLogicRequestUpgradeStrategy.handleSuccess(WebLogicRequestUpgradeStrategy.java:90)
at org.springframework.web.socket.server.standard.AbstractTyrusRequestUpgradeStrategy.upgradeInternal(AbstractTyrusRequestUpgradeStrategy.java:119)
at org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy.upgrade(AbstractStandardUpgradeStrategy.java:131)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.web.socket.server.HandshakeFailureException: Failed to obtain SubjectHandle; nested exception is java.lang.reflect.InvocationTargetException
at org.springframework.web.socket.server.standard.WebLogicRequestUpgradeStrategy$SubjectHelper.getSubject(WebLogicRequestUpgradeStrategy.java:247)
at org.springframework.web.socket.server.standard.WebLogicRequestUpgradeStrategy$TyrusMuxableWebSocketHelper.newInstance(WebLogicRequestUpgradeStrategy.java:178)
at org.springframework.web.socket.server.standard.WebLogicRequestUpgradeStrategy$TyrusMuxableWebSocketHelper.access$200(WebLogicRequestUpgradeStrategy.java:139)
at org.springframework.web.socket.server.standard.WebLogicRequestUpgradeStrategy.handleSuccess(WebLogicRequestUpgradeStrategy.java:90)
at org.springframework.web.socket.server.standard.AbstractTyrusRequestUpgradeStrategy.upgradeInternal(AbstractTyrusRequestUpgradeStrategy.java:119)
Truncated. see log file for complete stacktrace
Caused By: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.socket.server.standard.WebLogicRequestUpgradeStrategy$SubjectHelper.getSubject(WebLogicRequestUpgradeStrategy.java:239)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassCastException: org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper$HttpSessionWrapper cannot be cast to weblogic.servlet.security.internal.SessionSecurityData
at weblogic.servlet.security.internal.SecurityModule.getCurrentUser(SecurityModule.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
Truncated. see log file for complete stacktrace
READ ALSO
Контроллер для интерфейса в java?

Контроллер для интерфейса в java?

Хорошая ли идея для контроллера создавать интерфейс?

169
Рекурсивный обход дерева в глубину на JAVA (postOrder)

Рекурсивный обход дерева в глубину на JAVA (postOrder)

У меня есть файл relationsjson, в котором отражена структура {id, node, parent, level}, где:

205
Websocket задержка пересылки пакетов

Websocket задержка пересылки пакетов

Приветствую! Между клиентом и сервером через WebSocket как в синхронном, так и асинхронном режиме периодически возникает задержка пересылки...

189
pressed focused next button

pressed focused next button

В приложении на Android использую 10 кнопок и фокус при нажатии на кнопку

138