3 Replies Latest reply on Nov 30, 2006 4:49 AM by Richard Hardy

    java.lang.NoClassDefFoundError: javax/portlet/PortletContext

    Chris Lowe Apprentice

      I'm using EJB3 RC9 with Seam and the following exception occurs frequently when my session times out:

      15:20:10,243 ERROR [STDERR] Exception in thread "SFSB Passivation Thread - jboss.j2ee:ear=ocss.ear,jar=ocssEJB.jar,name=MyAccountBean,service=EJB3"
      15:20:10,243 ERROR [STDERR] java.lang.NoClassDefFoundError: javax/portlet/PortletContext
      15:20:10,243 ERROR [STDERR] at java.lang.Class.getDeclaredConstructors0(Native Method)
      15:20:10,243 ERROR [STDERR] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
      15:20:10,243 ERROR [STDERR] at java.lang.Class.getConstructor0(Class.java:2671)
      15:20:10,243 ERROR [STDERR] at java.lang.Class.getDeclaredConstructor(Class.java:1953)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.classmetamodel.SunConstructorManager.getConstructor(SunConstructorManager.java:70)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.classmetamodel.ClassMetaData.findConstructor(ClassMetaData.java:381)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.classmetamodel.ClassMetaData.<init>(ClassMetaData.java:127)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.classmetamodel.ClassMetamodelFactory.getClassMetaData(ClassMetamodelFactory.java:335)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:171)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.persister.RegularObjectPersister.writeSlotWithFields(RegularObjectPersister.java:182)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.persister.RegularObjectPersister.defaultWrite(RegularObjectPersister.java:90)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.persister.RegularObjectPersister.writeData(RegularObjectPersister.java:62)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.persister.ArrayPersister.saveObjectArray(ArrayPersister.java:110)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.persister.ArrayPersister.writeData(ArrayPersister.java:101)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
      15:20:10,243 ERROR [STDERR] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.io.MarshalledObject.<init>(MarshalledObject.java:51)
      15:20:10,243 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulBeanContext.writeExternal(StatefulBeanContext.java:401)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:202)
      15:20:10,243 ERROR [STDERR] at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)
      15:20:10,243 ERROR [STDERR] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
      15:20:10,243 ERROR [STDERR] at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:347)
      15:20:10,243 ERROR [STDERR] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:194)
      15:20:10,243 ERROR [STDERR] at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:129)
      


      Alright, I could add portal-api.jar to my deployment - but my application isn't using a portal.

      Any ideas on what might be wrong?

      Chris.