0 Replies Latest reply on Jun 24, 2014 7:56 AM by Rishikesh Darandale

    Internal Server Error while session restoration on WF 8.1.0.Final

    Rishikesh Darandale Newbie

      We have configured WF 8.1.0.Final in domain mode with 3 servers in cluster and mod_cluster as well. I am testing session replication for my application, as below steps:

      1) Launch my application

      2) Browse the application(which stores the data in session)

      3) Check the jSessionId value to check to which server/node it is connected.

      4) Bring down server/node

      5) Start browsing the application where you have left in step 2)

      6) Application throws the HTTP-500 error with following stack strace

       

      06:20:45,833 ERROR [io.undertow.servlet.request] (default task-1) UT015005: Error invoking method requestDestroyed on listener class org.springframework.web.context.request.RequestContextListener: java.lang.ClassCastException: com.opensymphony.clickstream.Clickstream cannot be cast to java.lang.String

       

      [Server:server1]     at org.jboss.marshalling.ModularClassResolver.resolveClass(ModularClassResolver.java:99)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:943)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:310)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1712)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1628)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1712)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1628)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

       

      [Server:server1]     at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:149)

       

      [Server:server1]     at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:135)

       

      [Server:server1]     at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:53)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverObjectInputStream.readObjectOverride(RiverObjectInputStream.java:307)

       

      [Server:server1]     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:364) [rt.jar:1.7.0_51]

       

      [Server:server1]     at java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1574) [rt.jar:1.7.0_51]

       

      [Server:server1]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]

       

      [Server:server1]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]

       

      [Server:server1]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]

       

      [Server:server1]     at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]

       

      [Server:server1]     at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:307)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1608)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1712)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1628)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1712)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1628)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1712)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1628)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1269)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadMapObject(RiverUnmarshaller.java:195)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.readMapData(RiverUnmarshaller.java:819)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:682)

       

      [Server:server1]     at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

       

      [Server:server1]     at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)

       

      [Server:server1]     at org.jboss.as.clustering.marshalling.SimpleMarshalledValue.get(SimpleMarshalledValue.java:101)

       

      [Server:server1]     at org.jboss.as.clustering.marshalling.SimpleMarshalledValue.get(SimpleMarshalledValue.java:45)

       

      [Server:server1]     at org.wildfly.clustering.web.infinispan.session.MarshalledValueSessionAttributeMarshaller.read(MarshalledValueSessionAttributeMarshaller.java:46)

       

      [Server:server1]     at org.wildfly.clustering.web.infinispan.session.MarshalledValueSessionAttributeMarshaller.read(MarshalledValueSessionAttributeMarshaller.java:33)

       

      [Server:server1]     at org.wildfly.clustering.web.infinispan.session.coarse.CoarseImmutableSessionAttributes.getAttributes(CoarseImmutableSessionAttributes.java:46)

       

      [Server:server1]     at org.wildfly.clustering.web.infinispan.session.coarse.CoarseImmutableSessionAttributes.getAttributeNames(CoarseImmutableSessionAttributes.java:51)

       

      [Server:server1]     at org.wildfly.clustering.web.infinispan.session.InfinispanSessionManager.findListeners(InfinispanSessionManager.java:320)

       

      [Server:server1]     at org.wildfly.clustering.web.infinispan.session.InfinispanSessionManager.triggerPostActivationEvents(InfinispanSessionManager.java:309)

       

      [Server:server1]     at org.wildfly.clustering.web.infinispan.session.InfinispanSessionManager.findSession(InfinispanSessionManager.java:164)

       

      [Server:server1]     at org.wildfly.clustering.web.undertow.session.DistributableSessionManager.getSession(DistributableSessionManager.java:115)

       

      [Server:server1]     at io.undertow.servlet.spec.ServletContextImpl.getSession(ServletContextImpl.java:677) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

       

      [Server:server1]     at io.undertow.servlet.spec.HttpServletRequestImpl.getSession(HttpServletRequestImpl.java:353) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

       

      [Server:server1]     at org.springframework.web.context.request.ServletRequestAttributes.updateAccessedSessionAttributes(ServletRequestAttributes.java:223) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]

       

      [Server:server1]     at org.springframework.web.context.request.AbstractRequestAttributes.requestCompleted(AbstractRequestAttributes.java:48) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]

       

      [Server:server1]     at org.springframework.web.context.request.RequestContextListener.requestDestroyed(RequestContextListener.java:82) [spring-web-4.0.5.RELEASE.jar:4.0.5.RELEASE]

       

      [Server:server1]     at io.undertow.servlet.core.ApplicationListeners.requestDestroyed(ApplicationListeners.java:225) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

       

      [Server:server1]     at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:283) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

       

      [Server:server1]     at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

       

      [Server:server1]     at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

       

      [Server:server1]     at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

       

      [Server:server1]     at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

       

      [Server:server1]     at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

       

      [Server:server1]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]

       

      [Server:server1]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]

       

      [Server:server1]     at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]

       

      [Server:server1] Caused by: an exception which occurred:

       

      [Server:server1]     in field partAttributes

       

      [Server:server1]     in object of type com.myapplication.domain.Part

       

      [Server:server1]     in field part

       

      [Server:server1]     in object of type com.myapplication.domain.LineItem

       

      [Server:server1]     in object of type java.util.concurrent.ConcurrentHashMap

       

      [Server:server1]     in field cartItems

       

      [Server:server1]     in object of type com.myapplication.domain.Cart

       

      [Server:server1]     in field bean

       

      [Server:server1]     in object of type org.springframework.beans.factory.support.DisposableBeanAdapter

       

      [Server:server1]     in field destructionCallback

       

      [Server:server1]     in object of type org.springframework.web.context.request.DestructionCallbackBindingListener

       

      [Server:server1]     in map value at index [7] of size [13]

       


       

       

      The above steps works as expected in WF 8.0.0.Final, can anyone guide me how to resolve this issue? I have verified as well that all objects are serializable before storing it into session. Is this related to WFLY-3352?