Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-18095

Using affinity=primary-owner with a local-cache throws a ClassCastException

XMLWordPrintable

    • Workaround Exists
    • Hide

      Use affinity=local instead.

      Show
      Use affinity=local instead.
    • ---
    • ---

      While a affinity=primary-owner is meant to behave identically to affinity=local if the backing Infinispan cache is non-clustered, this currently causes all requests to fail with:

      java.lang.ClassCastException: class org.infinispan.remoting.transport.LocalModeAddress cannot be cast to class java.lang.Void (org.infinispan.remoting.transport.LocalModeAddress is in unnamed module of loader 'org.inf...@14.0.8.Final' @52cf9167; java.lang.Void is in module java.base of loader 'bootstrap') at org.wildfly.clusteri...@28.0.1.Final//org.wildfly.clustering.server.infinispan.group.LocalGroup.createNode(LocalGroup.java:35) at org.wildfly.cluste...@28.0.1.Final//org.wildfly.clustering.ee.infinispan.PrimaryOwnerLocator.apply(PrimaryOwnerLocator.java:57) at org.wildfly.cluste...@28.0.1.Final//org.wildfly.clustering.ee.infinispan.PrimaryOwnerLocator.apply(PrimaryOwnerLocator.java:38) at org.wildfly.cluste...@28.0.1.Final//org.wildfly.clustering.web.infinispan.routing.PrimaryOwnerRouteLocator.locate(PrimaryOwnerRouteLocator.java:55) at org.wildfly.clust...@28.0.1.Final//org.wildfly.clustering.web.undertow.routing.DistributableSessionIdentifierCodec.encode(DistributableSessionIdentifierCodec.java:45) at org.wildfly.ext...@28.0.1.Final//org.wildfly.extension.undertow.session.CodecSessionConfig.clearSession(CodecSessionConfig.java:56) at io.undert...@2.3.6.Final//io.undertow.servlet.spec.ServletContextImpl$ServletContextSessionConfig.clearSession(ServletContextImpl.java:1268) at io.undert...@2.3.6.Final//io.undertow.servlet.spec.ServletContextImpl.getSession(ServletContextImpl.java:958) at io.undert...@2.3.6.Final//io.undertow.servlet.spec.HttpServletRequestImpl.getSession(HttpServletRequestImpl.java:450) at io.undert...@2.3.6.Final//io.undertow.servlet.spec.HttpServletRequestImpl.getSession(HttpServletRequestImpl.java:455)
      

      I would normally prioritize this as a blocker, but it technically has a workaround.

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: