Skip to content

Compatibility with GlassFish 4.1 and Tyrus 1.8 (WebSocket 1.1) [SPR-11094] #15720

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

Closed
spring-projects-issues opened this issue Nov 15, 2013 · 7 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Nov 15, 2013

Michael Irwin opened SPR-11094 and commented

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]]

Affects: 4.0 RC1, 4.0.3

Issue Links:

0 votes, 5 watchers

@spring-projects-issues
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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-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.

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented 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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

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: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants