3 Replies Latest reply on May 19, 2008 9:06 AM by jaikiran pai

    Exception during passivation a stateful session bean

    Katrin Wippermann Newbie

      Hi,

      I have a problem with an exception during passivation a stateful session bean that only occurs in product environment. The server produces the following stack trace:

      FATAL [org.jboss.serial.persister.RegularObjectPersister] error
      java.lang.reflect.InvocationTargetException
       at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithMethod(RegularObjectPersister.java:120)
       at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:86)
       at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
       at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
       at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
       at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
       at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
       at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
       at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
       at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
       at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
       at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
       at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
       at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:276)
       at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:206)
       at org.jboss.serial.persister.ObjectOutputStreamProxy.writeObjectOverride(ObjectOutputStreamProxy.java:60)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
       at EDU.oswego.cs.dl.util.concurrent.CopyOnWriteArrayList.writeObject(CopyOnWriteArrayList.java:772)
       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.ObjectOutputStream.writeObject(ObjectOutputStream.java:322)
       at java.util.ArrayList.writeObject(ArrayList.java:570)
      ......
      ......
      Caused by: java.lang.NoClassDefFoundError: org/jaxen/VariableContext
       at java.lang.Class.getDeclaredMethods0(Native Method)
       at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
       at java.lang.Class.getDeclaredMethod(Class.java:1935)
      ......
      


      I think the problem is that an instance variable of the session bean (an ArrayList) could not been passivated. I've tried to reproduce the error by setting the 'overager-period' and the 'max-bean-age' properties of the 'Standard Stateful SessionBean' element in the 'standardjboss.xml' file, but as long as we're using EJB 3 I had to configure the 'ejb3-interceptors-aop.xml' file I think. But I'm not sure which properties I have to change to activate an early passivation of the stateful session beans. Does someone have a solution for this?

      Thanks