14 Replies Latest reply on Aug 5, 2013 1:03 PM by tzman

    Seam 2.2 Session Replication

    tzman

      I have an existing Seam 2.2.0 application using JSF 1.2. We have migrated from JBoss AS 4.2.3 to EAP 6.1.

       

      The application works as expected but we are trying to run the application in a cluster with session replication. During failover tests we found that the application would fail trying to deserialize the the http session on the second host. The current page action has a reference to a number of seam components that are proxies created by Seam. It appears as though all of the components are correctly deserialized except for the component that was actually used by the page action. This component will faill when JBoss Marshalling tries to read the object (the action) and set the component. It fails trying to set a JavaBeanInterceptor instead of a proxy to the component.

       

      I was able to debug this to some degree and see that this particular component is read out of instance cache as a JavaBeanInterceptor instead of a proxy. Setting a break point in the readResolve of the JavaBeanInterceptor does appear to be hit for this component but does for the others.

       

      Has anyone attempted to turn session replication on for a seam 2.2 application running in JBoss 7 - EAP 6.1?

       

      Any insight on what could be causing this is greatly appreciated.

       

      07:11:39,926 WARN  [org.jboss.as.clustering.web.infinispan] (ajp-/172.16.4.34:8109-1) JBAS010322: Failed to load session 037omCaACqiSAh3EzZOFS2ns: java.lang.RuntimeException: JBAS010333: Failed to load session attributes for session: 037omCaACqiSAh3EzZOFS2ns

                at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$2.invoke(DistributedCacheManager.java:229)

                at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$2.invoke(DistributedCacheManager.java:212)

                at org.jboss.as.clustering.infinispan.invoker.SimpleCacheInvoker.invoke(SimpleCacheInvoker.java:34)

                at org.jboss.as.clustering.infinispan.invoker.BatchCacheInvoker.invoke(BatchCacheInvoker.java:48)

                at org.jboss.as.clustering.infinispan.invoker.RetryingCacheInvoker.invoke(RetryingCacheInvoker.java:81)

                at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$ForceSynchronousCacheInvoker.invoke(DistributedCacheManager.java:550)

                at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.getData(DistributedCacheManager.java:238)

                at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.getSessionData(DistributedCacheManager.java:196)

                at org.jboss.as.web.session.DistributableSessionManager.loadSession(DistributableSessionManager.java:1395) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.as.web.session.DistributableSessionManager.findSession(DistributableSessionManager.java:681) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.jboss.as.web.session.DistributableSessionManager.findSession(DistributableSessionManager.java:84) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.apache.catalina.connector.Request.doGetSession(Request.java:2605) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                at org.apache.catalina.connector.Request.getSession(Request.java:2357) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:99) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:488) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:420) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]

      Caused by: java.lang.IllegalArgumentException: Can not set com.cps.component.busn.BusnFindComp field com.cps.action.busn.BusnConfAction.busnFindComp to org.jboss.seam.intercept.JavaBeanInterceptor

                at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:164) [rt.jar:1.7.0_17]

                at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:168) [rt.jar:1.7.0_17]

                at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81) [rt.jar:1.7.0_17]

                at java.lang.reflect.Field.set(Field.java:680) [rt.jar:1.7.0_17]

                at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1678)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1594)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1558)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1236)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1678)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1594)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1558)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1558)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1236)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1678)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1594)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1236)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadMapObject(RiverUnmarshaller.java:195)

                at org.jboss.marshalling.river.RiverUnmarshaller.readMapData(RiverUnmarshaller.java:794)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:682)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadCollectionObject(RiverUnmarshaller.java:180)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObjectArray(RiverUnmarshaller.java:1503)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadArray(RiverUnmarshaller.java:1542)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:326)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadCollectionObject(RiverUnmarshaller.java:180)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObjectArray(RiverUnmarshaller.java:1503)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadArray(RiverUnmarshaller.java:1542)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:326)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadCollectionObject(RiverUnmarshaller.java:180)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObjectArray(RiverUnmarshaller.java:1503)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadArray(RiverUnmarshaller.java:1542)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:326)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadCollectionObject(RiverUnmarshaller.java:180)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObjectArray(RiverUnmarshaller.java:1503)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadArray(RiverUnmarshaller.java:1542)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:326)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadCollectionObject(RiverUnmarshaller.java:180)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObjectArray(RiverUnmarshaller.java:1503)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadArray(RiverUnmarshaller.java:1542)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:326)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadCollectionObject(RiverUnmarshaller.java:180)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObjectArray(RiverUnmarshaller.java:1503)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadArray(RiverUnmarshaller.java:1542)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:326)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1678)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1594)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1236)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:153)

                at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:139)

                at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:57)

                at java.io.ObjectInputStream.readObject(ObjectInputStream.java:363) [rt.jar:1.7.0_17]

                at java.util.HashMap.readObject(HashMap.java:1155) [rt.jar:1.7.0_17]

                at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [:1.7.0_17]

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

                at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]

                at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:218)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1575)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1558)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1558)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1236)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:153)

                at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:139)

                at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:57)

                at java.io.ObjectInputStream.readObject(ObjectInputStream.java:363) [rt.jar:1.7.0_17]

                at java.util.HashMap.readObject(HashMap.java:1155) [rt.jar:1.7.0_17]

                at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [:1.7.0_17]

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

                at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]

                at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:218)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1575)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1558)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1558)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1236)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1678)

                at org.jboss.marshalling.river.RiverObjectInputStream.defaultReadObject(RiverObjectInputStream.java:73)

                at org.ajax4jsf.application.AjaxStateHolder.readObject(AjaxStateHolder.java:204) [richfaces-impl.jar:3.3.1.1.BE]

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

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

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

                at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_17]

                at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:218)

                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1575)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1236)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadMapObject(RiverUnmarshaller.java:195)

                at org.jboss.marshalling.river.RiverUnmarshaller.readMapData(RiverUnmarshaller.java:794)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:682)

                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)

                at org.jboss.as.clustering.SimpleMarshalledValue.get(SimpleMarshalledValue.java:122)

                at org.jboss.as.clustering.web.impl.SessionAttributeMarshallerImpl.unmarshal(SessionAttributeMarshallerImpl.java:72)

                at org.jboss.as.clustering.web.infinispan.CoarseSessionAttributeStorage.load(CoarseSessionAttributeStorage.java:64)

                at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$2.invoke(DistributedCacheManager.java:227)

                ... 21 more

      Caused by: an exception which occurred:

                in field busnFindComp

                in object of type com.cp.action.busn.BusnAction

                in field action

                in object of type com.cps.component.busn.BusnFindComp

                in field bean

                in object of type org.jboss.seam.intercept.JavaBeanInterceptor

                in map value at index [0] of size [14]

                in element at index [0] of size [9]

                in element at index [0] of size [8]

                in element at index [0] of size [3]

                in element at index [0] of size [2]

                in element at index [0] of size [2]

                in element at index [1] of size [2]

                in field state

                in object of type org.ajax4jsf.application.AjaxStateHolder$StateReference

                in object of type org.ajax4jsf.util.LRUMap

                in object of type org.ajax4jsf.util.LRUMap

                in field views

                in object of type org.ajax4jsf.application.AjaxStateHolder

                in map value at index [3] of size [19]

        • 1. Re: Seam 2.2 Session Replication
          tzman

          After doing some more debuging I have found the issue. I am not sure how to solve it.

           

          The problem is that the code contains a circular reference which is a JavaBeanInterceptor in the super class. Below is the sequence of calls that end up causing the stack trace.

           

          Deserialization of the action is initiated.

          The action does not have a readObject or a readResolve, so deserialization is initiated on its fields

          The component field is encountered.

          The component field is determined to be a JavaBeanInterceptor.

          A new JavaBeanInterceptor is instantiated

          The JavaBeanInterceptor object is cached in the RiverUnmarshaller

          The object is passed to initialize the seriazable class

          The super class (RootInterceptor) is called to initialize the serializable class

          This super class does not have a readObject or readResolve, so deserialization is initiated on its fields

          The action field is encountered. In RiverUnmarshaller.doReadObject it falls into the case for ID_NEW_OBJECT_UNSHARED.

          When the deserialization of the action gets to the component field again it calls RiverUnmarshaller.doReadObject which falls into the ID_REPEAT_OBJECT_NEARISH case.

          The JavaBeanInterceptor for the component is then grabbed from the RiverUnmarshallers cache, which has not been completely deserialized

          The RiverUnmarhaller then tries to set the JavaBeanInterceptor which results in the stack trace above.

           

           

          This seems like this should be a valid use case and the code appears to be trying to handle this sort of situation. Im not sure though why this did not fail trying to read the back reference to the action and instead decided it was a new object.

           

          Does anyone have any insight into this?

          I do not see a forum for JBoss Marshalling, is there a better place to post this question?

           

          Any help would be greatly appriciated.

          • 2. Re: Seam 2.2 Session Replication
            dmlloyd

            Is there any way you can post or pastebin the source of the classes involved in the serialization?  JBoss Marshalling is (or at least should be) following the serialization specification behavior, so either there's a bug in the way I'm doing that, or the object classes themselves don't conform to the specification.  Either way at this point I'd have to see the code to know.

            • 3. Re: Seam 2.2 Session Replication
              tzman

              The application requires more then just an ear to deploy, there are some custom C++ servers that the application connects to for data. I will code up something that shows the error.

               

              Thanks for looking at this.

              • 4. Re: Seam 2.2 Session Replication
                tzman

                I was able to put together a simple seam web app that demonstrates the problem.

                 

                You can access the app with the appropriate url changes to http://localhost/seam_cluster

                The Seam Serialization link will show the issue. This works much the same as the demo I was using for testing.

                 

                I have attached the war file. I would provide the entire eclipse project but the zip file is too big.

                 

                Thanks again for the help!

                • 5. Re: Seam 2.2 Session Replication
                  tzman

                  David, did you get a chance to look at this?

                   

                  Thanks

                  • 6. Re: Seam 2.2 Session Replication
                    dmlloyd

                    I don't need the application, I just need to see the source code of certain classes which are listed in the stack trace (specifically, com.cp.action.busn.BusnAction, the version of org.jboss.seam.intercept.JavaBeanInterceptor that you're using, and the class of the object that was in the busnFindComp field of BusnAction) - that should be enough to identify the problem.

                    • 7. Re: Seam 2.2 Session Replication
                      tzman

                      There are quite a few base classes involved in our source code, would you need the entire hierarchy? The application I uploaded is far simpler and gives the same error as our application, stack trace is below.

                       

                      I have attached the seam jar files (2.2.0.GA)

                       

                       

                      10:57:18,265 WARN  [org.hornetq.core.client] (Thread-7 (HornetQ-client-global-threads-409889630)) HQ212037: Connection failure has been detected: HQ119015: The connection was disconnected because of server shutdown [code=DISCONNECTED]

                      10:57:22,763 WARN  [org.jboss.as.clustering.web.infinispan] (ajp-/172.16.4.34:8109-1) JBAS010322: Failed to load session xeZtqtqoJ1u-4xTHEqc8uz+1: java.lang.RuntimeException: JBAS010333: Failed to load session attributes for session: xeZtqtqoJ1u-4xTHEqc8uz+1

                                at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$2.invoke(DistributedCacheManager.java:229)

                                at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$2.invoke(DistributedCacheManager.java:212)

                                at org.jboss.as.clustering.infinispan.invoker.SimpleCacheInvoker.invoke(SimpleCacheInvoker.java:34)

                                at org.jboss.as.clustering.infinispan.invoker.BatchCacheInvoker.invoke(BatchCacheInvoker.java:48)

                                at org.jboss.as.clustering.infinispan.invoker.RetryingCacheInvoker.invoke(RetryingCacheInvoker.java:81)

                                at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$ForceSynchronousCacheInvoker.invoke(DistributedCacheManager.java:550)

                                at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.getData(DistributedCacheManager.java:238)

                                at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.getSessionData(DistributedCacheManager.java:196)

                                at org.jboss.as.web.session.DistributableSessionManager.loadSession(DistributableSessionManager.java:1395) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                                at org.jboss.as.web.session.DistributableSessionManager.findSession(DistributableSessionManager.java:681) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                                at org.jboss.as.web.session.DistributableSessionManager.findSession(DistributableSessionManager.java:84) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                                at org.apache.catalina.connector.Request.doGetSession(Request.java:2605) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                                at org.apache.catalina.connector.Request.getSession(Request.java:2357) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:99) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

                                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                                at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:488) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                                at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:420) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]

                                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]

                      Caused by: java.lang.IllegalArgumentException: Can not set cluster.example.component.SerializableComponent field cluster.example.action.SeamSerializeAction.serComp to org.jboss.seam.intercept.JavaBeanInterceptor

                                at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:164) [rt.jar:1.7.0_17]

                                at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:168) [rt.jar:1.7.0_17]

                                at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81) [rt.jar:1.7.0_17]

                                at java.lang.reflect.Field.set(Field.java:680) [rt.jar:1.7.0_17]

                                at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1678)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1594)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1236)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                                at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1678)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1594)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1236)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                                at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1678)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1594)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1236)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doReadMapObject(RiverUnmarshaller.java:195)

                                at org.jboss.marshalling.river.RiverUnmarshaller.readMapData(RiverUnmarshaller.java:794)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:682)

                                at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

                                at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37)

                                at org.jboss.as.clustering.SimpleMarshalledValue.get(SimpleMarshalledValue.java:122)

                                at org.jboss.as.clustering.web.impl.SessionAttributeMarshallerImpl.unmarshal(SessionAttributeMarshallerImpl.java:72)

                                at org.jboss.as.clustering.web.infinispan.CoarseSessionAttributeStorage.load(CoarseSessionAttributeStorage.java:64)

                                at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$2.invoke(DistributedCacheManager.java:227)

                                ... 21 more

                      Caused by: an exception which occurred:

                                in field serComp

                                in object of type cluster.example.action.SeamSerializeAction

                                in field action

                                in object of type cluster.example.component.SerializableComponent

                                in field bean

                                in object of type org.jboss.seam.intercept.JavaBeanInterceptor

                                in map value at index [1] of size [10]

                      • 8. Re: Seam 2.2 Session Replication
                        dmlloyd

                        Well, without the source all I can do is say "Seam bug" and leave it at that.  I think what's happening is that the seam interceptor thing isn't using object replacement properly and is deserializing wrong.

                        • 9. Re: Seam 2.2 Session Replication
                          tzman

                          The source for the application i uploaded is in the war file along with the class files. Or do you mean the seam source code?

                           

                          Shouldnt the readResolve method always be called, seems like this method would handle the case properly?

                           

                          I have a custom interceptor much like the seam one, so if there is an issue there then I have one as well.

                          • 10. Re: Seam 2.2 Session Replication
                            tzman

                            Attached source to test application.

                             

                            Is there anything else you need? Again. I can send you the source for our application if this test source isn't enough. I just thought a simpler example would be easier to look at.

                            • 11. Re: Seam 2.2 Session Replication
                              dmlloyd

                              It does seem to be some kind of Seam bug.  I'll see if I can find a Seam 2 expert to have a look.

                              1 of 1 people found this helpful
                              • 12. Re: Seam 2.2 Session Replication
                                tzman

                                I would like to know what the bug is when you find out. Again I have an intercptor that would need to change as well.

                                 

                                Thanks again David!

                                • 13. Re: Seam 2.2 Session Replication
                                  ctomc

                                  Looking at the code, i would recommend you not to use outjections at all.

                                   

                                  that is problematic performance wise and only gets worse in clustered enviroments.

                                   

                                  It looks like seam bug in any case, but if possible change code to use @Factory instead of @Out and performance of your application will thank you for it.

                                   

                                  I am saying that in general terms not just for this case.

                                   

                                  btw, did you try upgrading to seam 2.3 which has many fixes to make it properly work on AS7?

                                  • 14. Re: Seam 2.2 Session Replication
                                    tzman

                                    The actual code is as a nested reusable componet with a listener to catch update or change events. The listener is the ui action the xhtml is referencing. We actually dont use @Out much, but I wasnt aware there were performance issues with it.

                                     

                                    How would a factory help here?

                                     

                                    I changed the code to look up the listener by name when it is needed, which removes the circular reference.

                                     

                                    The application is rather large, and would be a bit of a risk to upgrade to 2.3. I know you can run JSF 2 in 1.2 mode, but not sure how well it actualy works.