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

Wrong path to RequestUpgradeStrategies in HandshakeWebSocketService [SPR-15089] #19655

Closed
spring-projects-issues opened this issue Jan 4, 2017 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jan 4, 2017

Johannes Dato opened SPR-15089 and commented

I'm Using Boot 2.0.0.BUILD-SNAPSHOT and spring-boot-dependencies-web-reactive 0.1.0.BUILD-SNAPSHOT

I tried to implement a WebSocket (see reference url) and got the Following Exception:

Caused by: java.lang.ClassNotFoundException: org.springframework.web.reactive.socket.server.support.TomcatRequestUpgradeStrategy

The TomcatRequestUpgradeStrategy is located in a different package.
It should reference to:
org.springframework.web.reactive.socket.server.upgrade.TomcatRequestUpgradeStrategy instead of org.springframework.web.reactive.socket.server.support.TomcatRequestUpgradeStrategy

The bug is located in the HandshakeWebSocketService line 126:

className = HandshakeWebSocketService.class.getPackage().getName() + "." + className;
Class<?> clazz = ClassUtils.forName(className, HandshakeWebSocketService.class.getClassLoader());

Affects: 5.0 M4

Reference URL: http://docs.spring.io/spring-framework/docs/5.0.0.BUILD-SNAPSHOT/spring-framework-reference/html/web-reactive.html#web-reactive-websocket-support

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Jan 4, 2017

Juergen Hoeller commented

Let's do fully qualified paths there for 5.0 RC1. getPackage() is unfortunately not reliable to begin with: It may return null at runtime...

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

2 participants