Skip to content
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

Make UndertowRequestUpgradeStrategy compatible with Undertow 1.3 [SPR-13494] #18072

Closed
spring-projects-issues opened this issue Sep 24, 2015 · 3 comments
Assignees
Labels
in: web type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Sep 24, 2015

Andy Wilkinson opened SPR-13494 and commented

The return type of HttpServerExchange has changed which leads to a NoSuchMethodError when running Spring Framework 4.2.1 against Undertow 1.3:

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 fix for this in 4.2.2 would be most welcome as we'd like to use Undertow 1.3 in Boot 1.3.


Affects: 4.2.1

Issue Links:

  • #16836 Support for Undertow 1.1 / WildFly 8.2
  • #17950 Make UndertowXhrTransport compatible with Undertow 1.3
  • #18127 Modifications to UndertowXhrTransport for Undertow 1.3 introduce breaking changes

Referenced from: commits 1458c7e

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 24, 2015

Andy Wilkinson commented

The spring-boot-sample-websocket-undertow project in this Spring Boot branch can be used to reproduce the problem.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 24, 2015

Juergen Hoeller commented

Brian Clozel, I'm about to turn that call in UndertowRequestUpgradeStrategy into a reflective arrangement; I'll commit this within an hour. It would be great if you could test it along with #17950 afterwards...

Juergen

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 24, 2015

Andy Wilkinson commented

With a workaround for #18082 in place things now look good with Undertow 1.3.0.RC2 and continue to look good with Undertow 1.2.x. Thanks for taking care of this so quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants