Not found matching default RequestUpgradeStrategy

I am trying to run Websocket on Spring (not STOMP, but a regular websocket), as shown here . However, after completing this lesson, 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 in several versions of Tomcat, the newest (which I suppose should have JSR 356 support) was Tomcat 7.0.50

What can i do wrong?

+7
java spring spring-mvc tomcat
source share
2 answers

I was able to solve this by simply updating Tomcat 7.0.52.

+6
source share

You need tomcat websocket if you use a pier

 <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-websocket</artifactId> <version>8.0.28</version> </dependency> 
0
source share

All Articles