2 Replies Latest reply on Aug 10, 2005 11:22 PM by doofus

    EAR Packaging Issues (Serialization)

    doofus Newbie

      I have packaged my EJB using one PAR file, one EJB3 file and one EAR file using the structure:

      
       - test.ear
       = test.par
       - com.test.entities/*.class
       - META-INF/persistence.xml
      
       = test.ejb3
       - com.test.interfaces/*.class
       - com.test.session/*.class
      
       = META-INF
       - application.xml
      
      


      When i try and run the application I get an error regarding serialization (see below). If I package everything into an .ejb3 file and deploy it, it works fine. Any ideas? I have included my application.xml file too.

      -luke


      Error:



      2005-08-11 12:24:42,410 INFO [STDOUT] java.lang.RuntimeException: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=HODT50178/14, BranchQual=, localId=14] status=STATUS_NO_TRANSACTION; - nested throwable: (org.hibernate.type.SerializationException: could not deserialize)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:185)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:167)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:74)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:39)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:63)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:91)
      2005-08-11 12:24:42,410 INFO [STDOUT] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
      2005-08-11 12:24:42,426 INFO [STDOUT] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:195)
      2005-08-11 12:24:42,426 INFO [STDOUT] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
      2005-08-11 12:24:42,426 INFO [STDOUT] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:69)
      2005-08-11 12:24:42,426 INFO [STDOUT] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:325)
      2005-08-11 12:24:42,426 INFO [STDOUT] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:201)
      2005-08-11 12:24:42,426 INFO [STDOUT] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:259)
      2005-08-11 12:24:42,426 INFO [STDOUT] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:313)
      2005-08-11 12:24:42,441 INFO [STDOUT] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:147)
      2005-08-11 12:24:42,441 INFO [STDOUT] Caused by: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=HODT50178/14, BranchQual=, localId=14] status=STATUS_NO_TRANSACTION; - nested throwable: (org.hibernate.type.SerializationException: could not deserialize)
      2005-08-11 12:24:42,441 INFO [STDOUT] at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:354)
      2005-08-11 12:24:42,441 INFO [STDOUT] at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:162)
      2005-08-11 12:24:42,441 INFO [STDOUT] ... 19 more
      2005-08-11 12:24:42,441 INFO [STDOUT] Caused by: org.hibernate.type.SerializationException: could not deserialize
      2005-08-11 12:24:42,441 INFO [STDOUT] at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:211)
      2005-08-11 12:24:42,457 INFO [STDOUT] at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:234)
      2005-08-11 12:24:42,457 INFO [STDOUT] at org.hibernate.type.SerializableToBlobType.fromBytes(SerializableToBlobType.java:65)
      2005-08-11 12:24:42,457 INFO [STDOUT] at org.hibernate.type.SerializableToBlobType.get(SerializableToBlobType.java:57)
      2005-08-11 12:24:42,457 INFO [STDOUT] at org.hibernate.type.AbstractLobType.nullSafeGet(AbstractLobType.java:43)
      2005-08-11 12:24:42,457 INFO [STDOUT] at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
      2005-08-11 12:24:42,457 INFO [STDOUT] at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:1761)
      2005-08-11 12:24:42,457 INFO [STDOUT] at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1314)
      2005-08-11 12:24:42,457 INFO [STDOUT] at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1242)
      2005-08-11 12:24:42,473 INFO [STDOUT] at org.hibernate.loader.Loader.getRow(Loader.java:1139)
      2005-08-11 12:24:42,473 INFO [STDOUT] at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:552)
      2005-08-11 12:24:42,473 INFO [STDOUT] at org.hibernate.loader.Loader.doQuery(Loader.java:666)
      2005-08-11 12:24:42,473 INFO [STDOUT] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:221)
      2005-08-11 12:24:42,473 INFO [STDOUT] at org.hibernate.loader.Loader.loadCollection(Loader.java:1829)
      2005-08-11 12:24:42,473 INFO [STDOUT] at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
      2005-08-11 12:24:42,488 INFO [STDOUT] at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:520)
      2005-08-11 12:24:42,488 INFO [STDOUT] at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
      2005-08-11 12:24:42,488 INFO [STDOUT] at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1424)
      2005-08-11 12:24:42,488 INFO [STDOUT] at org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:436)
      2005-08-11 12:24:42,488 INFO [STDOUT] at org.hibernate.engine.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:786)
      2005-08-11 12:24:42,488 INFO [STDOUT] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:226)
      2005-08-11 12:24:42,488 INFO [STDOUT] at org.hibernate.loader.Loader.loadCollection(Loader.java:1829)
      2005-08-11 12:24:42,504 INFO [STDOUT] at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
      2005-08-11 12:24:42,504 INFO [STDOUT] at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:520)
      2005-08-11 12:24:42,504 INFO [STDOUT] at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
      2005-08-11 12:24:42,504 INFO [STDOUT] at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1424)
      2005-08-11 12:24:42,504 INFO [STDOUT] at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:341)
      2005-08-11 12:24:42,504 INFO [STDOUT] at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:85)
      2005-08-11 12:24:42,504 INFO [STDOUT] at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:246)
      2005-08-11 12:24:42,519 INFO [STDOUT] at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:197)
      2005-08-11 12:24:42,519 INFO [STDOUT] at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:189)
      2005-08-11 12:24:42,519 INFO [STDOUT] at org.hibernate.engine.CascadingAction.getAllElementsIterator(CascadingAction.java:243)
      2005-08-11 12:24:42,519 INFO [STDOUT] at org.hibernate.engine.CascadingAction.access$100(CascadingAction.java:21)
      2005-08-11 12:24:42,519 INFO [STDOUT] at org.hibernate.engine.CascadingAction$8.getCascadableChildrenIterator(CascadingAction.java:205)
      2005-08-11 12:24:42,519 INFO [STDOUT] at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:288)
      2005-08-11 12:24:42,519 INFO [STDOUT] at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:185)
      2005-08-11 12:24:42,519 INFO [STDOUT] at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:160)
      2005-08-11 12:24:42,535 INFO [STDOUT] at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
      2005-08-11 12:24:42,535 INFO [STDOUT] at org.hibernate.engine.Cascade.cascade(Cascade.java:248)
      2005-08-11 12:24:42,535 INFO [STDOUT] at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:124)
      2005-08-11 12:24:42,535 INFO [STDOUT] at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:115)
      2005-08-11 12:24:42,535 INFO [STDOUT] at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:62)
      2005-08-11 12:24:42,551 INFO [STDOUT] at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
      2005-08-11 12:24:42,551 INFO [STDOUT] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:750)
      2005-08-11 12:24:42,551 INFO [STDOUT] at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:185)
      2005-08-11 12:24:42,551 INFO [STDOUT] at org.jboss.ejb3.entity.ManagedEntityManagerFactory$SessionSynchronization.beforeCompletion(ManagedEntityManagerFactory.java:89)
      2005-08-11 12:24:42,551 INFO [STDOUT] at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1473)
      2005-08-11 12:24:42,551 INFO [STDOUT] at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1092)
      2005-08-11 12:24:42,551 INFO [STDOUT] at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:306)
      2005-08-11 12:24:42,551 INFO [STDOUT] ... 20 more
      2005-08-11 12:24:42,551 INFO [STDOUT] Caused by: java.io.StreamCorruptedException: invalid stream header
      2005-08-11 12:24:42,582 INFO [STDOUT] at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:753)
      2005-08-11 12:24:42,582 INFO [STDOUT] at java.io.ObjectInputStream.<init>(ObjectInputStream.java:268)
      2005-08-11 12:24:42,582 INFO [STDOUT] at org.hibernate.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:246)
      2005-08-11 12:24:42,582 INFO [STDOUT] at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:203)
      2005-08-11 12:24:42,582 INFO [STDOUT] ... 68 more



      application.xml:

      
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE application PUBLIC
       "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
       "http://java.sun.com/dtd/application_1_3.dtd">
      
      <application>
       <display-name>TestEJB</display-name>
      
       <module>
       <ejb>test.par</ejb>
       </module>
       <module>
       <ejb>test.ejb3</ejb>
       </module>
      </application>