java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • See the stack trace below. This happen when sending an incorrect STOMP command (eg "FOO") with no payload. In that case, the StompDecoder returns a null decoded message, causing the NPE. {noformat} java.lang.NullPointerException: null at org.springframework.web.socket.messaging.StompSubProtocolHandler.handleMessageFromClient(StompSubProtocolHandler.java:127) ~[spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.messaging.SubProtocolWebSocketHandler.handleMessage(SubProtocolWebSocketHandler.java:233) [spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.handler.WebSocketHandlerDecorator.handleMessage(WebSocketHandlerDecorator.java:59) [spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator.handleMessage(LoggingWebSocketHandlerDecorator.java:55) [spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.handler.ExceptionWebSocketHandlerDecorator.handleMessage(ExceptionWebSocketHandlerDecorator.java:69) [spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.adapter.jetty.JettyWebSocketHandlerAdapter.onWebSocketText(JettyWebSocketHandlerAdapter.java:77) [spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_45] at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:71) [websocket-common-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:72) [websocket-common-9.1.0.v20131115.jar:9.1.0.v20131115] {noformat}
    via by Pierre Fouché,
  • See the stack trace below. This happen when sending an incorrect STOMP command (eg "FOO") with no payload. In that case, the StompDecoder returns a null decoded message, causing the NPE. {noformat} java.lang.NullPointerException: null at org.springframework.web.socket.messaging.StompSubProtocolHandler.handleMessageFromClient(StompSubProtocolHandler.java:127) ~[spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.messaging.SubProtocolWebSocketHandler.handleMessage(SubProtocolWebSocketHandler.java:233) [spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.handler.WebSocketHandlerDecorator.handleMessage(WebSocketHandlerDecorator.java:59) [spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator.handleMessage(LoggingWebSocketHandlerDecorator.java:55) [spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.handler.ExceptionWebSocketHandlerDecorator.handleMessage(ExceptionWebSocketHandlerDecorator.java:69) [spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.adapter.jetty.JettyWebSocketHandlerAdapter.onWebSocketText(JettyWebSocketHandlerAdapter.java:77) [spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_45] at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:71) [websocket-common-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:72) [websocket-common-9.1.0.v20131115.jar:9.1.0.v20131115] {noformat}
    via by Pierre Fouché,
    • java.lang.NullPointerException: null at org.springframework.web.socket.messaging.StompSubProtocolHandler.handleMessageFromClient(StompSubProtocolHandler.java:127)[spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.messaging.SubProtocolWebSocketHandler.handleMessage(SubProtocolWebSocketHandler.java:233)[spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.handler.WebSocketHandlerDecorator.handleMessage(WebSocketHandlerDecorator.java:59)[spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator.handleMessage(LoggingWebSocketHandlerDecorator.java:55)[spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.handler.ExceptionWebSocketHandlerDecorator.handleMessage(ExceptionWebSocketHandlerDecorator.java:69)[spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at org.springframework.web.socket.adapter.jetty.JettyWebSocketHandlerAdapter.onWebSocketText(JettyWebSocketHandlerAdapter.java:77)[spring-websocket-4.0.0.RELEASE.jar:4.0.0.RELEASE] at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_45] at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:71)[websocket-common-9.1.0.v20131115.jar:9.1.0.v20131115] at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:72)[websocket-common-9.1.0.v20131115.jar:9.1.0.v20131115]
    No Bugmate found.