Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TomcatRequestUpgradeStrategy is not compatible with Tomcat 10.1 #29433

Closed
wilkinsona opened this issue Nov 5, 2022 · 3 comments
Closed

TomcatRequestUpgradeStrategy is not compatible with Tomcat 10.1 #29433

wilkinsona opened this issue Nov 5, 2022 · 3 comments
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug

Comments

@wilkinsona
Copy link
Member

Affects: 6.0.0-RC3

java.lang.NoSuchMethodError: 'void org.apache.tomcat.websocket.server.WsServerContainer.doUpgrade(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, jakarta.websocket.server.ServerEndpointConfig, java.util.Map)'
	at org.springframework.web.socket.server.standard.TomcatRequestUpgradeStrategy.upgradeInternal(TomcatRequestUpgradeStrategy.java:73) ~[spring-websocket-6.0.0-RC3.jar:6.0.0-RC3]
	at org.springframework.web.socket.server.standard.AbstractStandardUpgradeStrategy.upgrade(AbstractStandardUpgradeStrategy.java:136) ~[spring-websocket-6.0.0-RC3.jar:6.0.0-RC3]
	at org.springframework.web.socket.server.support.AbstractHandshakeHandler.doHandshake(AbstractHandshakeHandler.java:289) ~[spring-websocket-6.0.0-RC3.jar:6.0.0-RC3]
	at org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler.doHandshake(WebSocketTransportHandler.java:137) ~[spring-websocket-6.0.0-RC3.jar:6.0.0-RC3]
	at org.springframework.web.socket.sockjs.transport.TransportHandlingSockJsService.handleRawWebSocketRequest(TransportHandlingSockJsService.java:216) ~[spring-websocket-6.0.0-RC3.jar:6.0.0-RC3]
	at org.springframework.web.socket.sockjs.support.AbstractSockJsService.handleRequest(AbstractSockJsService.java:441) ~[spring-websocket-6.0.0-RC3.jar:6.0.0-RC3]
	at org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler.handleRequest(SockJsHttpRequestHandler.java:134) ~[spring-websocket-6.0.0-RC3.jar:6.0.0-RC3]
	at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:52) ~[spring-webmvc-6.0.0-RC3.jar:6.0.0-RC3]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1080) ~[spring-webmvc-6.0.0-RC3.jar:6.0.0-RC3]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:973) ~[spring-webmvc-6.0.0-RC3.jar:6.0.0-RC3]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1003) ~[spring-webmvc-6.0.0-RC3.jar:6.0.0-RC3]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:895) ~[spring-webmvc-6.0.0-RC3.jar:6.0.0-RC3]
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:705) ~[tomcat-embed-core-10.1.1.jar:6.0]

upgradeHttpToWebSocket(Object, Object, ServerEndpointConfig, Map<String, String>) that was added in Tomcat 10.0 should be used instead.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 5, 2022
@wilkinsona
Copy link
Member Author

I've been testing Boot against a local build of Framework that contains this change and it seems to do the trick.

@jhoeller jhoeller added in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 5, 2022
@jhoeller jhoeller added this to the 6.0.0 milestone Nov 5, 2022
@jhoeller
Copy link
Contributor

jhoeller commented Nov 5, 2022

@wilkinsona Looks like we had an old code path just for Tomcat 9.0 compatibility there which obviously isn't relevant anymore. Your change looks straightforward. Could you turn this into a PR? Otherwise we can also manually upgrade the code accordingly.

@wilkinsona
Copy link
Member Author

Closing in favor of #29434.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Nov 5, 2022
@jhoeller jhoeller removed this from the 6.0.0 milestone Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants