Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-512

Spring security incompatibility

XMLWordPrintable

      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.

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              dsolimando Damien Solimando (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: