Skip to content

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

Closed

Description

@spring-projects-issues

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

Activity

  1. spring-projects-issues commented on Nov 26, 2013

    @spring-projects-issues
    CollaboratorAuthor

    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.

  2. spring-projects-issues commented on Dec 16, 2013

    @spring-projects-issues
    CollaboratorAuthor

    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

  3. spring-projects-issues commented on Jan 27, 2014

    @spring-projects-issues
    CollaboratorAuthor
  4. spring-projects-issues commented on Jul 24, 2014

    @spring-projects-issues
    CollaboratorAuthor

    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.

  5. spring-projects-issues commented on Jul 25, 2014

    @spring-projects-issues
    CollaboratorAuthor

    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.

  6. spring-projects-issues commented on Aug 6, 2014

    @spring-projects-issues
    CollaboratorAuthor
  7. spring-projects-issues commented on Aug 19, 2014

    @spring-projects-issues
    CollaboratorAuthor

    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

  8. added
    type: enhancement
    in: web
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webtype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions