Closed emorakis closed 8 years ago
Please disregard the oppened issue. It was infact caused by a misconfigured maven plugin in eclipse in combination with some missing dependencies regarding the reactor project and not the actual websocket/sockjs xml configuration. Apologies for any inconvinience caused.
Hi everyone i would like to start by apologising if this is the wrong place to ask the following question. I have been strugling with a webapp using spring 4.2.4 and tomcat (both versions 7.0.47 and 8.0.32) that uses spring's support for stomp/websocket utilizing the sockjs stuff. I have moddeled my dispatcher-xml per your design here: https://github.com/spring-projects/spring-framework/blob/master/spring-websocket/src/test/resources/org/springframework/web/socket/config/websocket-config-handlers-sockjs-attributes.xml
and also the guidelines of spring listed here:http://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html I started out originally with this configuration that utilises a full message broker (not the simple memory one) inside my dispatcher-servlet.xml:
when tried this originally with tomcat 7.0.47 i got the following stack-trace:
which i guess the important stuff show up in the beginnig complaining about not being able to create a WebSocketTransportHandler due to no suitable default RequestUpgradeStrategy . Upgrading tomcat to version 8.0.32 gave the exact same result.
I then thought i could change the dispatcher-servle.xml code to contain a transport like so to solve the problem:
which then reported the following stack-trace in both versions of tomcat (i.e. 7.0.47 and 8.0.32):
and some more truncated from the above trace to conserve space...
basically this time complaining it cannot create bean org.springframework.web.socket.server.support.WebSocketHandlerMapping#0' due to initialization erros because of class: javax/websocket/WebSocketContainer not being found.However this class is in the project's class path since i can see it is being included with tomcat's libraries. I know that is a lot to ask but can someone please explain what is going on with spring and tomcat and the websockets thing cause i am really running late with work because of this issue that i cannot seem to resolve.
For completness i also include the pom for the project: