Skip to content

Upgrade to Undertow 1.3 #3969

Closed
Closed

Description

@wilkinsona

1.3.0.CR1 has just been released so it looks like there's a good chance that 1.3.0.Final will be available in time for our 1.3 release

Activity

  1. added
    type: enhancement
    on Sep 16, 2015
  2. added this to the 1.3.0.RC1 milestone on Sep 16, 2015
  3. wilkinsona commented on Sep 24, 2015

    @wilkinsona
    MemberAuthor

    This is currently blocked by a breaking API change that causes a NoSuchMethodError in Spring Framework's WebSocket support:

    java.lang.NoSuchMethodError: io.undertow.servlet.websockets.ServletWebSocketHttpExchange.getBufferPool()Lorg/xnio/Pool;
        at org.springframework.web.socket.server.standard.UndertowRequestUpgradeStrategy$1.handleUpgrade(UndertowRequestUpgradeStrategy.java:152) ~[spring-websocket-4.2.1.RELEASE.jar:4.2.1.RELEASE]
        at io.undertow.server.protocol.http.HttpReadListener.exchangeComplete(HttpReadListener.java:350) ~[undertow-core-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.server.protocol.http.HttpServerConnection.exchangeComplete(HttpServerConnection.java:225) ~[undertow-core-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.server.HttpServerExchange.invokeExchangeCompleteListeners(HttpServerExchange.java:1202) ~[undertow-core-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.server.HttpServerExchange.terminateResponse(HttpServerExchange.java:1479) ~[undertow-core-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.server.Connectors.terminateResponse(Connectors.java:99) ~[undertow-core-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.server.protocol.http.HttpTransferEncoding$3.handleEvent(HttpTransferEncoding.java:197) ~[undertow-core-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.server.protocol.http.HttpTransferEncoding$3.handleEvent(HttpTransferEncoding.java:195) ~[undertow-core-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.conduits.HeadStreamSinkConduit.exitFlush(HeadStreamSinkConduit.java:178) ~[undertow-core-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.conduits.HeadStreamSinkConduit.flush(HeadStreamSinkConduit.java:122) ~[undertow-core-1.3.0.CR2.jar:1.3.0.CR2]
        at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162) ~[xnio-api-3.3.2.Final.jar:3.3.2.Final]
        at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:119) ~[undertow-core-1.3.0.CR2.jar:1.3.0.CR2]
        at org.xnio.channels.Channels.flushBlocking(Channels.java:63) ~[xnio-api-3.3.2.Final.jar:3.3.2.Final]
        at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:609) ~[undertow-servlet-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:473) ~[undertow-servlet-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:557) ~[undertow-servlet-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:331) ~[undertow-servlet-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263) ~[undertow-servlet-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) ~[undertow-servlet-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174) ~[undertow-servlet-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:198) ~[undertow-core-1.3.0.CR2.jar:1.3.0.CR2]
        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:784) ~[undertow-core-1.3.0.CR2.jar:1.3.0.CR2]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0]
        at java.lang.Thread.run(Thread.java:744) ~[na:1.8.0]
    

    A work-in-progress branch is available here.

  4. added a commit that references this issue on Oct 8, 2015
  5. zhanhb commented on Oct 11, 2015

    @zhanhb
    Contributor

    1.3.0.Final has been released.

  6. self-assigned this
    on Oct 12, 2015
  7. conteit commented on Jan 7, 2016

    @conteit

    I'm getting a similar error with spring-boot 1.3.1.RELEASE. It occurs the first time a WebSocket client tries to establish a connection.

    java.lang.NoSuchMethodError: io.undertow.servlet.websockets.ServletWebSocketHttpExchange.getBufferPool()Lorg/xnio/Pool;
        at org.springframework.web.socket.server.standard.UndertowRequestUpgradeStrategy$1.handleUpgrade(UndertowRequestUpgradeStrategy.java:152) ~[spring-websocket-4.2.1.RELEASE.jar:4.2.1.RELEASE]
        at io.undertow.server.protocol.http.HttpReadListener.exchangeComplete(HttpReadListener.java:352) ~[undertow-core-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.server.protocol.http.HttpServerConnection.exchangeComplete(HttpServerConnection.java:228) ~[undertow-core-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.server.HttpServerExchange.invokeExchangeCompleteListeners(HttpServerExchange.java:1226) ~[undertow-core-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.server.HttpServerExchange.terminateResponse(HttpServerExchange.java:1503) ~[undertow-core-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.server.Connectors.terminateResponse(Connectors.java:99) ~[undertow-core-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.server.protocol.http.HttpTransferEncoding$3.handleEvent(HttpTransferEncoding.java:197) ~[undertow-core-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.server.protocol.http.HttpTransferEncoding$3.handleEvent(HttpTransferEncoding.java:195) ~[undertow-core-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.conduits.HeadStreamSinkConduit.exitFlush(HeadStreamSinkConduit.java:178) ~[undertow-core-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.conduits.HeadStreamSinkConduit.flush(HeadStreamSinkConduit.java:122) ~[undertow-core-1.3.10.Final.jar:1.3.10.Final]
        at org.xnio.conduits.ConduitStreamSinkChannel.flush(ConduitStreamSinkChannel.java:162) ~[xnio-api-3.3.3.Final.jar:3.3.3.Final]
        at io.undertow.channels.DetachableStreamSinkChannel.flush(DetachableStreamSinkChannel.java:119) ~[undertow-core-1.3.10.Final.jar:1.3.10.Final]
        at org.xnio.channels.Channels.flushBlocking(Channels.java:63) ~[xnio-api-3.3.3.Final.jar:3.3.3.Final]
        at io.undertow.servlet.spec.ServletOutputStreamImpl.close(ServletOutputStreamImpl.java:609) ~[undertow-servlet-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.servlet.spec.HttpServletResponseImpl.closeStreamAndWriter(HttpServletResponseImpl.java:476) ~[undertow-servlet-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:560) ~[undertow-servlet-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:331) ~[undertow-servlet-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263) ~[undertow-servlet-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) ~[undertow-servlet-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174) ~[undertow-servlet-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202) ~[undertow-core-1.3.10.Final.jar:1.3.10.Final]
        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793) ~[undertow-core-1.3.10.Final.jar:1.3.10.Final]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_51]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_51]
        at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_51]
  8. wilkinsona commented on Jan 7, 2016

    @wilkinsona
    MemberAuthor

    You are using Spring Framework 4.2.1 with Spring Boot 1.3.1. You should allow Spring Boot's dependency management to control the version of Spring Framework that's used (it should be 4.2.4.RELEASE).

  9. conteit commented on Jan 7, 2016

    @conteit

    Thank you for your fast answer.
    I had a dependency from spring-cloud-starter-parent Brixton.M1 that generated a conflict between spring-framework 4.2.1 and 4.2.4. Now it's fixed!

    Just another question: I configured my project by declaring spring-boot-starter-parent as parent, then I added spring-cloud-starter-parent in dependencyManagement for configuring spring-cloud dependencies. Is there a better practice to avoid conflict next time I update boot version or I just have to remember to update both of them?

  10. wilkinsona commented on Jan 7, 2016

    @wilkinsona
    MemberAuthor

    As chance would have it, we were discussing this today and have a plan in place to improve this. In the meantime, you may find some of the tips in this blog post to be useful.

  11. conteit commented on Jan 7, 2016

    @conteit

    Thank you very much for your help.

    Il giorno 07 gen 2016, alle ore 17:01, Andy Wilkinson <[email protected] mailto:[email protected]> ha scritto:

    As chance would have it, we were discussing this today and have a plan in place to improve this. In the meantime, you may find some of the tips in this blog post https://spring.io/blog/2015/11/25/migrating-spring-cloud-apps-from-spring-boot-1-2-to-1-3 to be useful.

    —
    Reply to this email directly or view it on GitHub #3969 (comment).

    Paolo Contessi
    (Software engineer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions