-
Bug
-
Resolution: Done
-
Major
-
1.0.0.Final
-
None
In the mentioned setup (HTTPD --> mod_proxy --> AJP --> Undertow in Wildfly), when the web application running on the WildFly server uses SSL session tracking mode, any attempt to access it crashes with a ClassCastException, like this:
2014-04-02 16:59:16,020 ERROR [io.undertow.request] (default task-9) Blocking request failed HttpServerExchange { GET /ajp-ssl-session-cce/index.html}: java.lang.ClassCastException: io.undertow.server.protocol.ajp.AjpServerConnection cannot be cast to io.undertow.server.protocol.http.HttpServerConnection at io.undertow.server.session.SslSessionConfig.findSessionId(SslSessionConfig.java:71) at org.wildfly.extension.undertow.session.CodecSessionConfig.findSessionId(CodecSessionConfig.java:56) at io.undertow.server.session.InMemorySessionManager.getSession(InMemorySessionManager.java:139) at io.undertow.servlet.spec.ServletContextImpl.getSession(ServletContextImpl.java:673) at io.undertow.servlet.spec.ServletContextImpl.getSession(ServletContextImpl.java:692) at io.undertow.servlet.spec.ServletContextImpl.updateSessionAccessTime(ServletContextImpl.java:696) at io.undertow.servlet.spec.HttpServletResponseImpl.responseDone(HttpServletResponseImpl.java:522) at io.undertow.servlet.spec.HttpServletResponseImpl.sendError(HttpServletResponseImpl.java:137) at io.undertow.servlet.spec.HttpServletResponseImpl.sendError(HttpServletResponseImpl.java:142) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:273) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0] at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0]
Changing the tracking mode to COOKIE fixes the problem.