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

ClassCastException in websockets-jsr when using custom session implementation

    XMLWordPrintable

Details

    Description

      We use custom session implementation from spring-session. When we want to upgrade request to websocket this exception occurs:

      java.lang.ClassCastException: org.springframework.session.web.http.SessionRepositoryFilter$SessionRepositoryRequestWrapper$HttpSessionWrapper cannot be cast to io.undertow.servlet.spec.HttpSessionImpl
      	at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:131)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      ...
      

      The bug was introduced in https://issues.jboss.org/browse/UNDERTOW-1301

      The same issue was mentioned on forum for the Apache Shiro session implementation (see forum reference)

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            vlastimil.dolejs Vlastimil Dolejš (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: