java.lang.IllegalStateException: The WebSocket session has been closed and no method (apart from close()) may be called on a closed session

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

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 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 Spring JIRA by Prashant Deva, 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, 2 years ago
The WebSocket session has been closed and no method (apart from close()) may be called on a closed session
via Stack Overflow by Ryan Baxter
, 1 year ago
The WebSocket session has been closed and no method (apart from close()) may be called on a closed session
via Spring JIRA by Prashant Deva, 1 year ago
The WebSocket session has been closed and no method (apart from close()) may be called on a closed session
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.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)

Users with the same issue

Samebug visitor profile picture
Unknown user
2 times, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.