glassfish
  1. glassfish
  2. GLASSFISH-15278

WELD-000612 Unable to deserialize field. Declaring bean id org.jboss.weld.bean

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1_b33
    • Fix Version/s: 3.1_b38
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      linux, latest glassfish 3.1, clustered setup

      Description

      This issue is with number guess sample.This sample is also failing in multi machine cluster setup.It was working with single machine setup.

      In a single instance setup, we are deploying the app to an instance say instance101 , then bringing the instance 101 down and then again restarting the instance then continuing with the app.

      But when we have the webserver and loadbalancing setup, this is failing.

      Exception:
      ==========

      [#|2010-12-20T20:53:32.329+0530|SEVERE|glassfish3.1|org.apache.catalina.connector.CoyoteAdapter|_ThreadID=16;_ThreadName=Thread-1;|PWC3989: An exception or error occurred in the container during the request processing
      org.jboss.weld.exceptions.IllegalStateException: WELD-000612 Unable to deserialize field. Declaring bean id org.jboss.weld.bean-/space/sony/builds/glassfish3/glassfish/nodes/agent3/instance102/applications/weld-numberguess/-ManagedBean-class org.jboss.weld.examples.numberguess.Game, declaring class public@SessionScoped @Named class org.jboss.weld.examples.numberguess.Game, field name randomNumber
      at org.jboss.weld.injection.FieldInjectionPoint$SerializationProxy.readResolve(FieldInjectionPoint.java:225)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1061)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1762)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
      at java.util.ArrayList.readObject(ArrayList.java:593)
      at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
      at org.apache.catalina.session.StandardSession.readRemainingObject(StandardSession.java:1951)
      at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1859)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
      at org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:1144)
      at org.apache.catalina.session.StoreBase.readSession(StoreBase.java:288)
      at org.glassfish.web.ha.session.management.ReplicationStore.getSession(ReplicationStore.java:542)
      at org.glassfish.web.ha.session.management.ReplicationStore.getSession(ReplicationStore.java:494)
      at org.glassfish.web.ha.session.management.ReplicationStore.loadFromBackingStore(ReplicationStore.java:413)
      at org.glassfish.web.ha.session.management.ReplicationStore.load(ReplicationStore.java:396)
      at org.glassfish.web.ha.session.management.ReplicationStore.load(ReplicationStore.java:391)
      at org.apache.catalina.session.PersistentManagerBase.doSwapIn(PersistentManagerBase.java:1055)
      at org.apache.catalina.session.PersistentManagerBase.swapIn(PersistentManagerBase.java:1016)
      at org.apache.catalina.session.PersistentManagerBase.swapIn(PersistentManagerBase.java:982)
      at org.apache.catalina.session.PersistentManagerBase.findSession(PersistentManagerBase.java:738)
      at org.apache.catalina.session.ManagerBase.findSession(ManagerBase.java:876)
      at org.apache.catalina.connector.Request.doGetSession(Request.java:2834)
      at org.apache.catalina.connector.Request.getSession(Request.java:2561)
      at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:920)
      at org.apache.catalina.core.StandardHostValve.preInvoke(StandardHostValve.java:623)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:323)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:817)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:718)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1007)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:619)

      #]
      1. server.log
        72 kB
        Sivakumar Thyagarajan

        Issue Links

          Activity

          Hide
          Sreekanth added a comment -

          number-guess.zip contains the logs generated from the clustered environment.The issue can be observed in the instance 4 server log.

          Show
          Sreekanth added a comment - number-guess.zip contains the logs generated from the clustered environment.The issue can be observed in the instance 4 server log.
          Hide
          Sreekanth added a comment -

          attaching War file being used.

          Show
          Sreekanth added a comment - attaching War file being used.
          Hide
          Sivakumar Thyagarajan added a comment -

          Weld seems to have a non-serializable Class (org.jboss.weld.injection.SimpleInjectionPoint) in the injected Bean and hence serialization of the session fails.

          [#|2010-12-29T15:32:49.105+0530|INFO|glassfish3.1|org.apache.catalina.session.ManagerBase|_ThreadID=16;_ThreadName=Thread-1;|PWC2785: Cannot serialize session attribute org.jboss.weld.context.ConversationContext.conversations for session 19458e718e99f064f17ad1e3ea7a
          java.io.NotSerializableException: org.jboss.weld.injection.SimpleInjectionPoint
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
          at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
          at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
          at java.util.HashMap.writeObject(HashMap.java:1001)
          at sun.reflect.GeneratedMethodAccessor38.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:1469)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
          at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:2067)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          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:1469)
          at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
          at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
          at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
          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:147)
          at org.glassfish.web.ha.session.management.ReplicationWebEventPersistentManager.doValveSave(ReplicationWebEventPersistentManager.java:157)
          at org.glassfish.web.ha.session.management.HASessionStoreValve.doPostInvoke(HASessionStoreValve.java:175)
          at org.glassfish.web.ha.session.management.HASessionStoreValve.postInvoke(HASessionStoreValve.java:136)
          at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:670)
          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
          at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
          at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
          at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
          at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:323)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
          at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
          at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:818)
          at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
          at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1008)
          at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
          at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
          at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
          at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
          at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
          at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
          at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
          at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
          at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
          at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
          at java.lang.Thread.run(Thread.java:662)

          #]

          [#|2010-12-29T15:32:49.143+0530|INFO|glassfish3.1|org.apache.catalina.session.ManagerBase|_ThreadID=16;_ThreadName=Thread-1;|PWC2785: Cannot serialize session attribute

          Show
          Sivakumar Thyagarajan added a comment - Weld seems to have a non-serializable Class (org.jboss.weld.injection.SimpleInjectionPoint) in the injected Bean and hence serialization of the session fails. [#|2010-12-29T15:32:49.105+0530|INFO|glassfish3.1|org.apache.catalina.session.ManagerBase|_ThreadID=16;_ThreadName=Thread-1;|PWC2785: Cannot serialize session attribute org.jboss.weld.context.ConversationContext.conversations for session 19458e718e99f064f17ad1e3ea7a java.io.NotSerializableException: org.jboss.weld.injection.SimpleInjectionPoint at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330) at java.util.HashMap.writeObject(HashMap.java:1001) at sun.reflect.GeneratedMethodAccessor38.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:1469) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330) at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:2067) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:1469) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330) 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:147) at org.glassfish.web.ha.session.management.ReplicationWebEventPersistentManager.doValveSave(ReplicationWebEventPersistentManager.java:157) at org.glassfish.web.ha.session.management.HASessionStoreValve.doPostInvoke(HASessionStoreValve.java:175) at org.glassfish.web.ha.session.management.HASessionStoreValve.postInvoke(HASessionStoreValve.java:136) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:670) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:323) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:818) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1008) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:662) #] [#|2010-12-29T15:32:49.143+0530|INFO|glassfish3.1|org.apache.catalina.session.ManagerBase|_ThreadID=16;_ThreadName=Thread-1;|PWC2785: Cannot serialize session attribute
          Hide
          Sivakumar Thyagarajan added a comment -

          Attaching the server.log showing the session serialization failure

          Show
          Sivakumar Thyagarajan added a comment - Attaching the server.log showing the session serialization failure
          Hide
          Sivakumar Thyagarajan added a comment -
          Show
          Sivakumar Thyagarajan added a comment - Filed https://issues.jboss.org/browse/WELD-812 to track this.
          Hide
          Sivakumar Thyagarajan added a comment -

          This issue has been partially resolved as part of WELD-812, but there are still some problems around de-serialization of the Conversation and session. I am working with the Weld team and will close this issue after we resolve that.

          Show
          Sivakumar Thyagarajan added a comment - This issue has been partially resolved as part of WELD-812, but there are still some problems around de-serialization of the Conversation and session. I am working with the Weld team and will close this issue after we resolve that.
          Hide
          Sivakumar Thyagarajan added a comment -

          Resolved through commits 44592 to 44594 by an integration of Weld 1.1.0.Final.

          Show
          Sivakumar Thyagarajan added a comment - Resolved through commits 44592 to 44594 by an integration of Weld 1.1.0.Final.

            People

            • Assignee:
              Sivakumar Thyagarajan
              Reporter:
              Sreekanth
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: