Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-678

ManagedConversation references in ServletConversationManager not serializable

XMLWordPrintable

    • Hide

      Deploy a simple JSF application with conversation-scoped beans in a GlassFish 3.1 cluster and start a conversation. The above error should appear in the server log.

      Show
      Deploy a simple JSF application with conversation-scoped beans in a GlassFish 3.1 cluster and start a conversation. The above error should appear in the server log.
    • Hide

      No workaround. Prevents use of Conversation-Scoped beans in high-availability environments

      Show
      No workaround. Prevents use of Conversation-Scoped beans in high-availability environments

      Deploying a CDI-enabled JSF application (with conversation scoped beans) with availability-enabled=true (to enable HTTP session replication) in latest GlassFish 3.1 cluster, and using the application results in the following error while persisting the HTTP session.

      On further debugging, it appears that ServletConversationManager has a reference to ManagedConversations which are non-serializable and appears to be a regression (ie introduced after WELD-214).

      > [#|2010-09-13T20:04:52.789+0530|INFO|glassfish3.1|org.apache.catalina.session.ManagerBase|_ThreadID=17;_ThreadName=Thread-1;|PWC2785: Cannot serialize session attribute org.jboss.weld.context.SessionContext#org.jboss.weld.bean-weld-ManagedBean-class org.jboss.weld.conversation.ServletConversationManager for session b7ed19d916e9a008293e41c15971
      > java.io.NotSerializableException: org.jboss.weld.conversation.ManagedConversation
      > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
      > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
      > at java.util.concurrent.ConcurrentHashMap.writeObject(ConcurrentHashMap.java:1247)
      > at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
      > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      > at java.lang.reflect.Method.invoke(Method.java:597)
      > at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
      > at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
      > at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
      > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
      > at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
      > at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
      > at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
      > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
      > at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
      > at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
      > at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
      > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
      > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
      > at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:2063)
      > at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
      > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      > at java.lang.reflect.Method.invoke(Method.java:597)
      > at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
      > at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
      > at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
      > at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
      > at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
      > at org.apache.catalina.session.StoreBase.writeSession(StoreBase.java:269)
      > at org.glassfish.web.ha.session.management.HAStoreBase.getByteArray(HAStoreBase.java:229)
      > at org.glassfish.web.ha.session.management.ReplicationStore.doValveSave(ReplicationStore.java:153)
      > at org.glassfish.web.ha.session.management.ReplicationWebEventPersistentManager.doValveSave(ReplicationWebEventPersistentManager.java:154)
      > at org.glassfish.web.ha.session.management.HASessionStoreValve.doPostInvoke(HASessionStoreValve.java:163)

              pmuiratbleepbleep Pete Muir (Inactive)
              sivakumart_jira Sivakumar Thyagarajan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: