Details
-
Feature Request
-
Resolution: Done
-
Major
-
1.1.8.Final
Description
The following exception is raised when setting WriteListener
java.lang.ClassCastException: org.springframework.security.web.servletapi.HttpServlet3RequestFactory$SecurityContextAsyncContext cannot be cast to io.undertow.servlet.spec.AsyncContextImpl
at io.undertow.servlet.spec.ServletOutputStreamImpl.setWriteListener(ServletOutputStreamImpl.java:751)
Spring security is wrapping the servlet request in order to stock security data. these wrapper implements the standards servlet interfaces.
When watching the io.undertow.servlet.spec.ServletOutputStreamImpl.setWriteListener source code, it can be seen that a casting is done to conncrete AsyncContextImpl class (line 752) causing the classcastexception.