You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear Rossen Stoyanchev,
I got problem with spring-boot(4.0.6)+websocket(STOMP over Websocket) project using SockJS. I am inspired by yours websocket portfolio project(https://github.com/rstoyanchev/spring-websocket-portfolio) that runs me well locally.
Thus I created new one project with websocket copy same controller/service of yours project and so on but still getting error:
Ignoring message, no principal info available
MissingSessionUserException: No "user" header in message
Problem concerns to websocket session has no principal: special "user" destinations.
detailed log below:
2014-07-23 15:04:18,798|DEBUG|http-nio-8080-exec-3|DefaultHandshakeHandler:161 |doHandshake | Initiating handshake for http://localhost:8080/portfolio/486/brqzqaa_/websocket, headers={upgrade=[websocket], connection=[Upgrade], host=[localhost:8080], origin=[http://localhost:8080], pragma=[no-cache], cache-control=[no-cache], sec-websocket-key=[t0FUCeCTOeoG4+tXeaimrA==], sec-websocket-version=[13], sec-websocket-extensions=[permessage-deflate; client_max_window_bits, x-webkit-deflate-frame], user-agent=[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36], cookie=[JSESSIONID=BC85FB1441A81ADE7D106F1EF13401B6; SQLiteManager_currentLangue=2]}
2014-07-23 15:04:18,866|ERROR|clientInboundChannel-1|DefaultUserDestinationResolver:136|parseUserDestination| Ignoring message, no principal info available
2014-07-23 15:04:18,877|ERROR|clientInboundChannel-4|AbstractMethodMessageHandler:495|processHandlerMethodException| Error while handling exception
org.springframework.messaging.simp.annotation.support.MissingSessionUserException: No "user" header in message
at org.springframework.messaging.simp.annotation.support.SendToMethodReturnValueHandler.handleReturnValue(SendToMethodReturnValueHandler.java:132) ~[spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:97) ~[spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.processHandlerMethodException(AbstractMethodMessageHandler.java:492) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.handleMatch(AbstractMethodMessageHandler.java:460) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler.handleMatch(SimpAnnotationMethodMessageHandler.java:363) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler.handleMatch(SimpAnnotationMethodMessageHandler.java:80) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.handleMessageInternal(AbstractMethodMessageHandler.java:409) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.handleMessage(AbstractMethodMessageHandler.java:345) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.support.ExecutorSubscribableChannel$1.run(ExecutorSubscribableChannel.java:70) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
Dear Rossen Stoyanchev,
I got problem with spring-boot(4.0.6)+websocket(STOMP over Websocket) project using SockJS. I am inspired by yours websocket portfolio project(https://github.com/rstoyanchev/spring-websocket-portfolio) that runs me well locally.
Thus I created new one project with websocket copy same controller/service of yours project and so on but still getting error:
Ignoring message, no principal info available
MissingSessionUserException: No "user" header in message
Problem concerns to websocket session has no principal: special "user" destinations.
detailed log below:
2014-07-23 15:04:18,798|DEBUG|http-nio-8080-exec-3|DefaultHandshakeHandler:161 |doHandshake | Initiating handshake for http://localhost:8080/portfolio/486/brqzqaa_/websocket, headers={upgrade=[websocket], connection=[Upgrade], host=[localhost:8080], origin=[http://localhost:8080], pragma=[no-cache], cache-control=[no-cache], sec-websocket-key=[t0FUCeCTOeoG4+tXeaimrA==], sec-websocket-version=[13], sec-websocket-extensions=[permessage-deflate; client_max_window_bits, x-webkit-deflate-frame], user-agent=[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36], cookie=[JSESSIONID=BC85FB1441A81ADE7D106F1EF13401B6; SQLiteManager_currentLangue=2]}
2014-07-23 15:04:18,799|DEBUG|http-nio-8080-exec-3|DefaultHandshakeHandler:202 |doHandshake | Selected sub-protocol: 'null'
2014-07-23 15:04:18,801|DEBUG|http-nio-8080-exec-3|MyHandshakeHandler:41 |determineUser | request.getPrincipal(): null
2014-07-23 15:04:18,866|ERROR|clientInboundChannel-1|DefaultUserDestinationResolver:136|parseUserDestination| Ignoring message, no principal info available
2014-07-23 15:04:18,877|ERROR|clientInboundChannel-4|AbstractMethodMessageHandler:495|processHandlerMethodException| Error while handling exception
org.springframework.messaging.simp.annotation.support.MissingSessionUserException: No "user" header in message
at org.springframework.messaging.simp.annotation.support.SendToMethodReturnValueHandler.handleReturnValue(SendToMethodReturnValueHandler.java:132) ~[spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:97) ~[spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.processHandlerMethodException(AbstractMethodMessageHandler.java:492) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.handleMatch(AbstractMethodMessageHandler.java:460) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler.handleMatch(SimpAnnotationMethodMessageHandler.java:363) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler.handleMatch(SimpAnnotationMethodMessageHandler.java:80) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.handleMessageInternal(AbstractMethodMessageHandler.java:409) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.handler.invocation.AbstractMethodMessageHandler.handleMessage(AbstractMethodMessageHandler.java:345) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at org.springframework.messaging.support.ExecutorSubscribableChannel$1.run(ExecutorSubscribableChannel.java:70) [spring-messaging-4.0.6.RELEASE.jar:4.0.6.RELEASE]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
Already 1 day spent by solving this problem. I studied:
http://rstoyanchev.github.io/springx2013-websocket/#83
http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/websocket.html#websocket-stomp-handle-user
http://assets.spring.io/wp/WebSocketBlogPost.html
Please, can you be so kind to send you zipped project, really same but with spring-boot usage.
My mail is [email protected]
Honestly, thank for response.
The text was updated successfully, but these errors were encountered: