You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compatibility with GlassFish 4.1 and Tyrus 1.8 (WebSocket 1.1) [SPR-11094] #15720
During deploy of webapp using 4.0.0.BUILD-SNAPSHOT into Glassfish nightly (Nov 14, 2013), the following exception is thrown. Websocket connections then return a 404, as they are not able to upgrade.
Caused by: java.lang.NoClassDefFoundError: org/glassfish/tyrus/websockets/WebSocketEngine$WebSocketHolderListener
at java.lang.Class.getDeclaredConstructors0(Native Method) ~[na:1.7.0_45]
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2493) ~[na:1.7.0_45]
at java.lang.Class.getConstructor0(Class.java:2803) ~[na:1.7.0_45]
at java.lang.Class.getConstructor(Class.java:1718) ~[na:1.7.0_45]
at org.springframework.web.socket.server.DefaultHandshakeHandler.initRequestUpgradeStrategy(DefaultHandshakeHandler.java:109) ~[spring-websocket-4.0.0.BUILD-20131113.185211-366.jar:4.0.0.BUILD-SNAPSHOT]
... 117 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.glassfish.tyrus.websockets.WebSocketEngine$WebSocketHolderListener
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1783) ~[war-util.jar:na]
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633) ~[war-util.jar:na]
... 122 common frames omitted]]
It looks like GlassFish 4.0.1 is not going to be released any time soon, so let's move this one to Spring Framework 4.1. Frankly, I'm not sure we'll be seeing a proper GlassFish release even in time for our 4.1 there...
The master branch is now at version 1.7 of Tyrus and has been tested with GlassFish 4.0.1-b09 (with Tyrus 1.8-b01 inside). Note that master is no longer compatible with GlassFish 4.0 as a result of the upgrade. In other words Spring Framework 4.1 will require GlassFish 4.0.1+.
Unfortunately it doesn't seem possible to have GlassFish integration tests in the spring-websocket module since glassfish-embedded-all and glassfish-embedded-web bundle old Tomcat code that conflicts with our Tomcat integration tests. The specific java.lang.VerifyError is on org.apache.catalina.startup.Embedded which in the old code overrides the start() method from Lifecycle where in Tomcat 7+ that is a final method.
After #15917 the version of Tyrus we compile with is now 1.3.5 (to match the version WebLogic 12.1.3 ships with). Regardless the support for GlassFish 4.0.1 with the current version of Tyrus should be unaffected.
A review also indicates general WebSocket 1.1 compatibility with respect to the use of addMessageHandler, in addition to the tested runtime compatibility with Tyrus 1.8.
Activity
spring-projects-issues commentedon Nov 26, 2013
Rossen Stoyanchev commented
Since this is only a snapshot, it isn't urgent to resolve immediately. We'll try and get to it soon after GA.
spring-projects-issues commentedon Dec 16, 2013
Juergen Hoeller commented
It looks like GlassFish 4.0.1 is not going to be released any time soon, so let's move this one to Spring Framework 4.1. Frankly, I'm not sure we'll be seeing a proper GlassFish release even in time for our 4.1 there...
Juergen
spring-projects-issues commentedon Jan 27, 2014
Juergen Hoeller commented
Tyrus 1.4 is final and apparently integrated into GlassFish 4.0.1 nightly builds now:
https://blogs.oracle.com/PavelBucek/entry/updating_tyrus_in_glassfish
spring-projects-issues commentedon Jul 24, 2014
Rossen Stoyanchev commented
The master branch is now at version 1.7 of Tyrus and has been tested with GlassFish 4.0.1-b09 (with Tyrus 1.8-b01 inside). Note that master is no longer compatible with GlassFish 4.0 as a result of the upgrade. In other words Spring Framework 4.1 will require GlassFish 4.0.1+.
Unfortunately it doesn't seem possible to have GlassFish integration tests in the spring-websocket module since
glassfish-embedded-allandglassfish-embedded-webbundle old Tomcat code that conflicts with our Tomcat integration tests. The specific java.lang.VerifyError is onorg.apache.catalina.startup.Embeddedwhich in the old code overrides the start() method fromLifecyclewhere in Tomcat 7+ that is a final method.spring-projects-issues commentedon Jul 25, 2014
Rossen Stoyanchev commented
After #15917 the version of Tyrus we compile with is now 1.3.5 (to match the version WebLogic 12.1.3 ships with). Regardless the support for GlassFish 4.0.1 with the current version of Tyrus should be unaffected.
spring-projects-issues commentedon Aug 6, 2014
Juergen Hoeller commented
It's going to be called GlassFish 4.1 now, still scheduled for release in August:
https://blogs.oracle.com/theaquarium/entry/spotlight_on_glassfish_4_1
spring-projects-issues commentedon Aug 19, 2014
Juergen Hoeller commented
A review also indicates general WebSocket 1.1 compatibility with respect to the use of
addMessageHandler, in addition to the tested runtime compatibility with Tyrus 1.8.Juergen