Summary: | IllegalArgumentException "endpointClass cannot be null" after upgrade to 9.0.46 | ||
---|---|---|---|
Product: | Tomcat 9 | Reporter: | Rossen Stoyanchev <rstoyanchev> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 9.0.46 | ||
Target Milestone: | ----- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Rossen Stoyanchev
2021-05-29 09:41:45 UTC
Thanks, I can see what is going on. The CDI integration needs to know if it can "short-cut" the Endpoint creation process and use the InstanceManager to create the Endpoint instance (which allows non-zero-arg constructors to be used) or whether the Endpoint instance needs to be created via the standard WebSocket mechanism and then passed to the InstanceManager. I used a hack to figure this out that depends on how Tomcat implemented the WebSocket API. It appears you are using a different API implementation that has stricter checking. I should be able to fix this in the next release. In the meantime, a workaround would be to use the WebSocket API JAR from Tomcat 9. FWIW the relevant dependencies are tomcat-websocket, tomcat-embed-core, tomcat-util, and javax.websocket:javax.websocket-api and it's the ServerEndpointConfig.Builder in javax.websocket:javax.websocket-api where the exception is raised. Fixed in: - 10.0.x for 10.0.7 onwards - 9.0.x for 9.0.47 onwards - 8.5.x for 8.5.67 onwards |