I'm trying to run Websocket on Spring (Not STOMP but regular websocket) as seen here. However, after following the tutorial, I get the following exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.socket.server.support.DefaultHandshakeHandler#0': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.socket.server.support.DefaultHandshakeHandler]: Constructor threw exception; nested exception is java.lang.IllegalStateException: No suitable default RequestUpgradeStrategy found
I got this on several versions of Tomcat, the newest (which I assume really should have JSR 356 support) was a Tomcat 7.0.50
What could I be doing wrong?
I was able to resolve this by simply updating to Tomcat 7.0.52.
You need tomcat websocket if you use jetty
<dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-websocket</artifactId> <version>8.0.28</version> </dependency>