java.lang.IllegalStateException: The remote endpoint was in state [TEXT_PARTIAL_WRITING] which is an invalid state for called method

Spring JIRA | William Hoyle | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    In the following log the heartbeat thread is {{SockJsScheduler-8}} and the client thread is {{Broadcaster-3}}. There appears to be a race condition between the heartbeat task and the send thread. The send thread attempts to cancel the heartbeat task before sending, but the heartbeat task has already started. {code} 2016-06-13T00:14:22.288Z [TRACE] [] [SockJsScheduler-8] [WebSocketServerSockJsSession] Preparing to write SockJsFrame content='h' 2016-06-13T00:14:22.288Z [TRACE] [] [Broadcaster-3] [UserWebSocket] Session[fair3vq5]: Tx 'h' to user 76042 2016-06-13T00:14:22.288Z [TRACE] [] [SockJsScheduler-8] [WebSocketServerSockJsSession] Writing SockJsFrame content='h' 2016-06-13T00:14:22.288Z [TRACE] [] [Broadcaster-3] [WebSocketServerSockJsSession] Cancelling heartbeat in session fair3vq5 2016-06-13T00:14:22.288Z [TRACE] [] [SockJsScheduler-8] [NativeWebSocketSession] Sending TextMessage payload=[h], byteCount=1, last=true], StandardWebSocketSession[id=83, uri=/ajax/watch/websocket/029/fair3vq5/websocket] 2016-06-13T00:14:22.288Z [TRACE] [] [Broadcaster-3] [WebSocketServerSockJsSession] Preparing to write SockJsFrame content='a["h"]' 2016-06-13T00:14:22.288Z [TRACE] [] [Broadcaster-3] [WebSocketServerSockJsSession] Writing SockJsFrame content='a["h"]' 2016-06-13T00:14:22.288Z [TRACE] [] [Broadcaster-3] [NativeWebSocketSession] Sending TextMessage payload=[a["h"]], byteCount=6, last=true], StandardWebSocketSession[id=83, uri=/ajax/watch/websocket/029/fair3vq5/websocket] 2016-06-13T00:14:22.289Z [TRACE] [] [SockJsScheduler-8] [WebSocketServerSockJsSession] Scheduled heartbeat in session fair3vq5 2016-06-13T00:14:22.289Z [DEBUG] [] [Broadcaster-3] [WebSocketServerSockJsSession] Terminating connection after failure to send message to client java.lang.IllegalStateException: The remote endpoint was in state [TEXT_PARTIAL_WRITING] which is an invalid state for called method at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1064) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.textPartialStart(WsRemoteEndpointImplBase.java:1022) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendPartialString(WsRemoteEndpointImplBase.java:184) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:49) {code}

    Spring JIRA | 8 months ago | William Hoyle
    java.lang.IllegalStateException: The remote endpoint was in state [TEXT_PARTIAL_WRITING] which is an invalid state for called method
  2. 0

    In the following log the heartbeat thread is {{SockJsScheduler-8}} and the client thread is {{Broadcaster-3}}. There appears to be a race condition between the heartbeat task and the send thread. The send thread attempts to cancel the heartbeat task before sending, but the heartbeat task has already started. {code} 2016-06-13T00:14:22.288Z [TRACE] [] [SockJsScheduler-8] [WebSocketServerSockJsSession] Preparing to write SockJsFrame content='h' 2016-06-13T00:14:22.288Z [TRACE] [] [Broadcaster-3] [UserWebSocket] Session[fair3vq5]: Tx 'h' to user 76042 2016-06-13T00:14:22.288Z [TRACE] [] [SockJsScheduler-8] [WebSocketServerSockJsSession] Writing SockJsFrame content='h' 2016-06-13T00:14:22.288Z [TRACE] [] [Broadcaster-3] [WebSocketServerSockJsSession] Cancelling heartbeat in session fair3vq5 2016-06-13T00:14:22.288Z [TRACE] [] [SockJsScheduler-8] [NativeWebSocketSession] Sending TextMessage payload=[h], byteCount=1, last=true], StandardWebSocketSession[id=83, uri=/ajax/watch/websocket/029/fair3vq5/websocket] 2016-06-13T00:14:22.288Z [TRACE] [] [Broadcaster-3] [WebSocketServerSockJsSession] Preparing to write SockJsFrame content='a["h"]' 2016-06-13T00:14:22.288Z [TRACE] [] [Broadcaster-3] [WebSocketServerSockJsSession] Writing SockJsFrame content='a["h"]' 2016-06-13T00:14:22.288Z [TRACE] [] [Broadcaster-3] [NativeWebSocketSession] Sending TextMessage payload=[a["h"]], byteCount=6, last=true], StandardWebSocketSession[id=83, uri=/ajax/watch/websocket/029/fair3vq5/websocket] 2016-06-13T00:14:22.289Z [TRACE] [] [SockJsScheduler-8] [WebSocketServerSockJsSession] Scheduled heartbeat in session fair3vq5 2016-06-13T00:14:22.289Z [DEBUG] [] [Broadcaster-3] [WebSocketServerSockJsSession] Terminating connection after failure to send message to client java.lang.IllegalStateException: The remote endpoint was in state [TEXT_PARTIAL_WRITING] which is an invalid state for called method at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1064) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.textPartialStart(WsRemoteEndpointImplBase.java:1022) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendPartialString(WsRemoteEndpointImplBase.java:184) at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:49) {code}

    Spring JIRA | 8 months ago | William Hoyle
    java.lang.IllegalStateException: The remote endpoint was in state [TEXT_PARTIAL_WRITING] which is an invalid state for called method
  3. 0

    WebSocket The remote endpoint was in state [TEXT_PARTIAL_WRITING] | Solutions for enthusiast and professional programmers

    fatal-errors.com | 11 months ago
    java.lang.IllegalStateException: The remote endpoint was in state [TEXT_PARTIAL_WRITING] which is an invalid state for called method
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    WebSocket The remote endpoint was in state [TEXT_PARTIAL_WRITING]

    Stack Overflow | 2 years ago | mc j
    java.lang.IllegalStateException: The remote endpoint was in state [TEXT_PARTIAL_WRITING] which is an invalid state for called method
  6. 0

    IllegalStateException [TEXT_PARTIAL_WRITING] when sending messages using WebSocketSession

    Stack Overflow | 2 years ago
    java.lang.IllegalStateException: The remote endpoint was in state [TEXT_PARTIAL_WRITING] which is an invalid state for called method

    4 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      The remote endpoint was in state [TEXT_PARTIAL_WRITING] which is an invalid state for called method

      at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState()
    2. Tomcat WS
      WsRemoteEndpointBasic.sendText
      1. org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1064)
      2. org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.textPartialStart(WsRemoteEndpointImplBase.java:1022)
      3. org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendPartialString(WsRemoteEndpointImplBase.java:184)
      4. org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:49)
      4 frames