java.lang.IllegalStateException

The WebSocket session has been closed and no method (apart from close()) may be called on a closed session

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web25579

  • via Spring JIRA by Rossen Stoyanchev, 1 year ago
    The WebSocket session has been closed and no method (apart from close()) may be called on a closed session
  • via itquestionz.com by Unknown author, 1 year ago
    The WebSocket session has been closed and no method (apart from close()) may be called on a closed session
  • The WebSocket session [0] has been closed and no method (apart from close()) may be called on a closed session
  • Stack trace

    • java.lang.IllegalStateException: The WebSocket session has been closed and no method (apart from close()) may be called on a closed session at org.apache.tomcat.websocket.WsSession.checkState(WsSession.java:652) at org.apache.tomcat.websocket.WsSession.getUserPrincipal(WsSession.java:581) at org.springframework.web.socket.adapter.standard.StandardWebSocketSession.getPrincipal(StandardWebSocketSession.java:123) at org.springframework.web.socket.sockjs.transport.session.WebSocketServerSockJsSession.getPrincipal(WebSocketServerSockJsSession.java:73) at org.springframework.web.socket.messaging.StompSubProtocolHandler.afterSessionEnded(StompSubProtocolHandler.java:364) at org.springframework.web.socket.messaging.SubProtocolWebSocketHandler.clearSession(SubProtocolWebSocketHandler.java:352) at org.springframework.web.socket.messaging.SubProtocolWebSocketHandler.afterConnectionClosed(SubProtocolWebSocketHandler.java:347)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    2 times, 3 months ago
    Unknown user
    Once, 4 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago