tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Thomas.TH.Hamac...@partner.bmw.ch>
Subject Re: Problem with entityManager and Open EJB 3.1
Date Thu, 05 Feb 2009 14:00:47 GMT
Hi Olivier,

I´m currently struggling with using the Extended PersistenceContext in multiple SFSB.
Can you tell me, if it is working for you and what you did to make it work.
As soon as I try to inject the same EntityManager into another SessionBean I get the following
error:

DEBUG - finished invoking method create with exception:javax.ejb.EJBException: nested exception
is: org.apache.openejb.persistence.EntityManagerAlreadyRegisteredException: Another entity
manager is already registered for this persistence unit
javax.ejb.EJBException: nested exception is: org.apache.openejb.persistence.EntityManagerAlreadyRegisteredException:
Another entity manager is already registered for this persistence unit
org.apache.openejb.persistence.EntityManagerAlreadyRegisteredException: Another entity manager
is already registered for this persistence unit
 at org.apache.openejb.persistence.JtaEntityManagerRegistry$ExtendedRegistry.addEntityManagers(JtaEntityManagerRegistry.java:191)
 at org.apache.openejb.persistence.JtaEntityManagerRegistry$ExtendedRegistry.access$100(JtaEntityManagerRegistry.java:169)
 at org.apache.openejb.persistence.JtaEntityManagerRegistry.addEntityManagers(JtaEntityManagerRegistry.java:129)
 at org.apache.openejb.core.stateful.StatefulContainer.createEJBObject(StatefulContainer.java:288)
 at org.apache.openejb.core.stateful.StatefulContainer.invoke(StatefulContainer.java:263)
 at org.apache.openejb.core.ivm.EjbHomeProxyHandler.create(EjbHomeProxyHandler.java:270)
 at org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(EjbHomeProxyHandler.java:161)
 at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:286)
 at $Proxy75.create(Unknown Source)
 at org.apache.openejb.core.ivm.naming.BusinessLocalReference.getObject(BusinessLocalReference.java:33)
 at org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:150)
 at org.apache.openejb.core.ivm.naming.ContextWrapper.lookup(ContextWrapper.java:115)
 at javax.naming.InitialContext.lookup(InitialContext.java:351)

Any help would be greatly appriciated

Thanks
Thomas


> Hi,
>
> I use Open EJB to run TestNG unit tests in a Maven project. This
> project contains many Seam components. All of them are EJB3 stateful
> session beans (conversation scoped) and use extended persistence
> context (same persistence unit everywhere). All of these Seam
> components work perfect ... except one ! And I can't find any
> difference with other ones ! The problem occurs only with Open EJB
> 3.1, but it works well on Open EJB 3.0 or JBoss 4.2.0, so I think it
> is probably a bug with Open EJB 3.1.
>
>
> Here is the test I run :
>
>    public void testLoadReason()  throws java.lang.Exception
>    {
> new ComponentTest() {
> public void testComponents() throws java.lang.Exception {
> ReasonFacadeServiceLocal service =  (ReasonFacadeServiceLocal)
> getInstance("reasonFacadeService");
>            VOReason reason = service.loadReason("REASON_1");
>                   assert reason != null;
>            assert reason.getId() != null;
>            assert "REASON_1".equals(reason.getCode());
> }
> }.run();
>    }
>
> And here is the stack trace I get :
>
> testLoadReason
> (t4.core.commons.reason.facade.test.ReasonFacadeServiceTest)
> Time elapsed: 0.062 sec  <<< FAILURE!
> t4.core.commons.reason.facade.ReasonFacadeServiceException: Error
> performing
> 't4
> .core
> .commons.reason.facade.ReasonFacadeService.loadReason(java.lang.String
> code)' --> javax.ejb.EJBTransactionRolledbackException: The
> transaction has been marked rollback only because the bean encountered
> a non-application exception :org.jboss.seam.InstantiationException :
> Could not instantiate Seam component: processDao
> at
> t4
> .core
> .commons
> .reason
> .facade
> .ReasonFacadeServiceBase.loadReason(ReasonFacadeServiceBase.java:711)
> 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:585)
> at org.apache.openejb.core.interceptor.ReflectionInvocationContext
> $Invocation.invoke(ReflectionInvocationContext.java:158)
> at
> org
> .apache
> .openejb
> .core
> .interceptor
> .ReflectionInvocationContext
> .proceed(ReflectionInvocationContext.java:141)
> at
> org
> .jboss
> .seam
> .intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 56)
> at
> org
> .jboss
> .seam
> .transaction
> .RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org
> .jboss
> .seam
> .core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org
> .jboss
> .seam
> .core
> .MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:
> 44)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org
> .jboss
> .seam
> .persistence
> .EntityManagerProxyInterceptor
> .aroundInvoke(EntityManagerProxyInterceptor.java:29)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org
> .jboss
> .seam
> .persistence
> .HibernateSessionProxyInterceptor
> .aroundInvoke(HibernateSessionProxyInterceptor.java:31)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:
> 107)
> at
> org
> .jboss
> .seam
> .intercept
> .SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
> at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
> at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.openejb.core.interceptor.ReflectionInvocationContext
> $Invocation.invoke(ReflectionInvocationContext.java:158)
> at
> org
> .apache
> .openejb
> .core
> .interceptor
> .ReflectionInvocationContext
> .proceed(ReflectionInvocationContext.java:141)
> at
> org
> .apache
> .openejb
> .core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
> at
> org
> .apache
> .openejb
> .core
> .stateful.StatefulContainer.businessMethod(StatefulContainer.java:490)
> at
> org
> .apache
> .openejb
> .core.stateful.StatefulContainer.invoke(StatefulContainer.java:267)
> at
> org
> .apache
> .openejb
> .core
> .ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:
> 217)
> at
> org
> .apache
> .openejb
> .core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
> at
> org
> .apache
> .openejb
> .core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:286)
> at $Proxy144.loadReason(Unknown Source)
> 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:585)
> at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
> at
> org
> .jboss
> .seam
> .intercept.RootInvocationContext.proceed(RootInvocationContext.java:
> 31)
> at org.jboss.seam.intercept.ClientSideInterceptor
> $1.proceed(ClientSideInterceptor.java:76)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 56)
> at
> org
> .jboss
> .seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:43)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:
> 107)
> at
> org
> .jboss
> .seam
> .intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
> at org.javassist.tmp.java.lang.Object_$
> $_javassist_35.loadReason(Object_$$_javassist_35.java)
> at t4.core.commons.reason.facade.test.ReasonFacadeServiceTest
> $11.testComponents(ReasonFacadeServiceTest.java:428)
> at org.jboss.seam.mock.AbstractSeamTest
> $ComponentTest.run(AbstractSeamTest.java:162)
> at
> t4
> .core
> .commons
> .reason
> .facade
> .test
> .ReasonFacadeServiceTest.testLoadReason(ReasonFacadeServiceTest.java:
> 422)
> Caused by:
> org
> .apache.openejb.persistence.EntityManagerAlreadyRegisteredException:
> Another entity manager is already registered for this persistence unit
> at org.apache.openejb.persistence.JtaEntityManagerRegistry
> $ExtendedRegistry.addEntityManagers(JtaEntityManagerRegistry.java:191)
> at org.apache.openejb.persistence.JtaEntityManagerRegistry
> $ExtendedRegistry.access$100(JtaEntityManagerRegistry.java:169)
> at
> org
> .apache
> .openejb
> .persistence
> .JtaEntityManagerRegistry
> .addEntityManagers(JtaEntityManagerRegistry.java:129)
> at
> org
> .apache
> .openejb
> .core
> .stateful.StatefulContainer.createEJBObject(StatefulContainer.java:
> 288)
> at
> org
> .apache
> .openejb
> .core.stateful.StatefulContainer.invoke(StatefulContainer.java:263)
> at
> org
> .apache
> .openejb
> .core.ivm.EjbHomeProxyHandler.create(EjbHomeProxyHandler.java:270)
> at
> org
> .apache
> .openejb
> .core.ivm.EjbHomeProxyHandler._invoke(EjbHomeProxyHandler.java:161)
> at
> org
> .apache
> .openejb
> .core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:286)
> at $Proxy78.create(Unknown Source)
> at
> org
> .apache
> .openejb
> .core
> .ivm
> .naming.BusinessLocalReference.getObject(BusinessLocalReference.java:
> 33)
> at
> org.apache.openejb.core.ivm.naming.IvmContext.lookup(IvmContext.java:
> 150)
> at
> org
> .apache
> .openejb.core.ivm.naming.ContextWrapper.lookup(ContextWrapper.java:
> 115)
> at javax.naming.InitialContext.lookup(InitialContext.java:351)
> at org.jboss.seam.Component.instantiateSessionBean(Component.java:
> 1367)
> at org.jboss.seam.Component.instantiate(Component.java:1331)
> at org.jboss.seam.Component.newInstance(Component.java:2084)
> at org.jboss.seam.Component.getInstance(Component.java:1988)
> at org.jboss.seam.Component.getInstance(Component.java:1950)
> at org.jboss.seam.Component.getInstance(Component.java:1944)
> at
> org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:
> 2311)
> at org.jboss.seam.Component.getValueToInject(Component.java:2263)
> at org.jboss.seam.Component.injectAttributes(Component.java:1703)
> at org.jboss.seam.Component.inject(Component.java:1521)
> at
> org
> .jboss
> .seam
> .core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org
> .jboss
> .seam
> .core
> .MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:
> 44)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org
> .jboss
> .seam
> .persistence
> .EntityManagerProxyInterceptor
> .aroundInvoke(EntityManagerProxyInterceptor.java:29)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org
> .jboss
> .seam
> .persistence
> .HibernateSessionProxyInterceptor
> .aroundInvoke(HibernateSessionProxyInterceptor.java:31)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:
> 107)
> at
> org
> .jboss
> .seam
> .intercept
> .SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
> at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
> at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.openejb.core.interceptor.ReflectionInvocationContext
> $Invocation.invoke(ReflectionInvocationContext.java:158)
> at
> org
> .apache
> .openejb
> .core
> .interceptor
> .ReflectionInvocationContext
> .proceed(ReflectionInvocationContext.java:141)
> at
> org
> .apache
> .openejb
> .core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
> at
> org
> .apache
> .openejb
> .core
> .stateful.StatefulContainer.businessMethod(StatefulContainer.java:490)
> at
> org
> .apache
> .openejb
> .core.stateful.StatefulContainer.invoke(StatefulContainer.java:267)
> at
> org
> .apache
> .openejb
> .core
> .ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:
> 217)
> at
> org
> .apache
> .openejb
> .core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
> at
> org
> .apache
> .openejb
> .core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:286)
> at $Proxy147.toVOReason(Unknown Source)
> 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:585)
> at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
> at
> org
> .jboss
> .seam
> .intercept.RootInvocationContext.proceed(RootInvocationContext.java:
> 31)
> at org.jboss.seam.intercept.ClientSideInterceptor
> $1.proceed(ClientSideInterceptor.java:76)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 56)
> at
> org
> .jboss
> .seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:43)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:
> 107)
> at
> org
> .jboss
> .seam
> .intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
> at org.javassist.tmp.java.lang.Object_$
> $_javassist_38.toVOReason(Object_$$_javassist_38.java)
> at
> t4
> .core
> .commons
> .reason
> .facade
> .ReasonFacadeServiceBean
> .handleLoadReason(ReasonFacadeServiceBean.java:395)
> at
> t4
> .core
> .commons
> .reason
> .facade
> .ReasonFacadeServiceBase.loadReason(ReasonFacadeServiceBase.java:703)
> ... 77 more
>
> So it looks like a problem with entity manager. The
> reasonFacadeService Seam component injects reasonInternalService and
> reasonTransformer Seam components. The reasonTransformer component
> itself injects a processDao component, which itself injecte
> entityManager. And that's where the exception seems to occur ...
>
> ProcessDao component injects entity manager this way :
>
>    @javax.persistence.PersistenceContext(unitName = "t4Seam", type =
> javax.persistence.PersistenceContextType.EXTENDED)
>    protected javax.persistence.EntityManager emanager;
>
> And persistence unit is configured this way :
>
> <persistence
>    xmlns="http://java.sun.com/xml/ns/persistence"
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
>
> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
>    version="1.0">
>    <persistence-unit name="t4Seam">
>        <provider>org.hibernate.ejb.HibernatePersistence</provider>
>        <jta-data-source>java:/jdbc/t4Seam</jta-data-source>
>        <jar-file>../test-classes/lib/t4-core-utils-core.jar</jar-file>
> <mapping-file>META-INF/orm-commons.xml</mapping-file>
> <mapping-file>META-INF/orm-utils.xml</mapping-file>
>        <properties>
>            <property name="hibernate.hbm2ddl.auto" value="update"/>
>            <property name="hibernate.show_sql" value="false"/>
>            <property name="hibernate.jdbc.batch_size" value="0"/>
>        </properties>
>    </persistence-unit>
> </persistence>
>
> I also noted that calling the processDao in my tests with the
> following line ...
>
>    ProcessDao processDao = (ProcessDao) getInstance("processDao");
>
> ... caused the tests to run successful. But then I have this strange
> stack trace on System.out :
>
> ERROR - Passivation failed
> java.io.NotSerializableException:
> org.apache.openejb.persistence.JtaEntityManager
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> 1081)
> at
> java
> .io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:
> 1375)
> at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
> 1347)
> at
> java
> .io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
> 1290)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> 1079)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:
> 302)
> at
> org
> .apache.openejb.util.PojoSerialization.write(PojoSerialization.java:
> 134)
> at
> org
> .apache
> .openejb.util.PojoSerialization.writeObject(PojoSerialization.java:65)
> 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:585)
> at
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:
> 917)
> at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
> 1339)
> at
> java
> .io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
> 1290)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> 1079)
> at
> java
> .io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:
> 1375)
> at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
> 1347)
> at
> java
> .io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
> 1290)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> 1079)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:
> 302)
> at
> org
> .apache
> .openejb
> .core.stateful.SimplePassivater.passivate(SimplePassivater.java:70)
> at
> org
> .apache
> .openejb
> .core.stateful.SimplePassivater.passivate(SimplePassivater.java:84)
> at
> org
> .apache
> .openejb.core.stateful.SimpleCache.storeEntries(SimpleCache.java:467)
> at
> org
> .apache
> .openejb.core.stateful.SimpleCache.processLRU(SimpleCache.java:408)
> at
> org
> .apache.openejb.core.stateful.SimpleCache.checkIn(SimpleCache.java:
> 239)
> at
> org
> .apache
> .openejb
> .core
> .stateful.StatefulContainer.releaseInstance(StatefulContainer.java:
> 636)
> at org.apache.openejb.core.stateful.StatefulContainer.access
> $500(StatefulContainer.java:79)
> at org.apache.openejb.core.stateful.StatefulContainer
> $
> SessionSynchronizationCoordinator
> .afterCompletion(StatefulContainer.java:887)
> at org.apache.openejb.core.transaction.JtaTransactionPolicy
> $1.afterCompletion(JtaTransactionPolicy.java:155)
> at
> org
> .apache
> .geronimo
> .transaction
> .manager.TransactionImpl.afterCompletion(TransactionImpl.java:534)
> at
> org
> .apache
> .geronimo
> .transaction
> .manager.TransactionImpl.afterCompletion(TransactionImpl.java:526)
> at
> org
> .apache
> .geronimo
> .transaction.manager.TransactionImpl.commit(TransactionImpl.java:326)
> at
> org
> .apache
> .geronimo
> .transaction
> .manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:
> 245)
> at
> org
> .apache
> .openejb
> .core
> .transaction
> .JtaTransactionPolicy.completeTransaction(JtaTransactionPolicy.java:
> 291)
> at
> org
> .apache.openejb.core.transaction.TxRequired.commit(TxRequired.java:71)
> at
> org
> .apache
> .openejb
> .core
> .transaction.EjbTransactionUtil.afterInvoke(EjbTransactionUtil.java:
> 74)
> at
> org
> .apache
> .openejb
> .core.stateful.StatefulContainer.afterInvoke(StatefulContainer.java:
> 692)
> at
> org
> .apache
> .openejb
> .core
> .stateful.StatefulContainer.businessMethod(StatefulContainer.java:495)
> at
> org
> .apache
> .openejb
> .core.stateful.StatefulContainer.invoke(StatefulContainer.java:267)
> at
> org
> .apache
> .openejb
> .core
> .ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:
> 217)
> at
> org
> .apache
> .openejb
> .core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
> at
> org
> .apache
> .openejb
> .core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:286)
> at $Proxy154.findOrganizationalUnitMembers(Unknown Source)
> 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:585)
> at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
> at
> org
> .jboss
> .seam
> .intercept.RootInvocationContext.proceed(RootInvocationContext.java:
> 31)
> at org.jboss.seam.intercept.ClientSideInterceptor
> $1.proceed(ClientSideInterceptor.java:76)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 56)
> at
> org
> .jboss
> .seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:43)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:
> 107)
> at
> org
> .jboss
> .seam
> .intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
> at org.javassist.tmp.java.lang.Object_$
> $_javassist_45.findOrganizationalUnitMembers(Object_$
> $_javassist_45.java)
> at
> t4
> .core.commons.organization.facade.test.OrganizationFacadeServiceTest
> $12.testComponents(OrganizationFacadeServiceTest.java:681)
> at org.jboss.seam.mock.AbstractSeamTest
> $ComponentTest.run(AbstractSeamTest.java:162)
> at
> t4
> .core
> .commons
> .organization
> .facade
> .test
> .OrganizationFacadeServiceTest
> .testFindOrganizationalUnitMembers
> (OrganizationFacadeServiceTest.java:678)
> 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:585)
> at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:
> 580)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:478)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:607)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:874)
> at
> org
> .testng
> .internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:
> 125)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:
> 109)
> at org.testng.TestRunner.runWorkers(TestRunner.java:689)
> at org.testng.TestRunner.privateRun(TestRunner.java:566)
> at org.testng.TestRunner.run(TestRunner.java:466)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:301)
> at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:296)
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:276)
> at org.testng.SuiteRunner.run(SuiteRunner.java:191)
> at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:808)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:776)
> at org.testng.TestNG.run(TestNG.java:701)
> at
> org
> .apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:
> 77)
> at
> org
> .apache
> .maven
> .surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:
> 92)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
> 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:585)
> at
> org
> .apache
> .maven
> .surefire
> .booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:334)
> at
> org
> .apache
> .maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:980)
> ERROR - An unexpected exception occured while writting the entries
> to disk
> org.apache.openejb.SystemException: The type
> org.apache.openejb.persistence.JtaEntityManager is not serializable as
> mandated by the EJB specification.:
> org.apache.openejb.persistence.JtaEntityManager
> at
> org
> .apache
> .openejb
> .core.stateful.SimplePassivater.passivate(SimplePassivater.java:75)
> at
> org
> .apache
> .openejb
> .core.stateful.SimplePassivater.passivate(SimplePassivater.java:84)
> at
> org
> .apache
> .openejb.core.stateful.SimpleCache.storeEntries(SimpleCache.java:467)
> at
> org
> .apache
> .openejb.core.stateful.SimpleCache.processLRU(SimpleCache.java:408)
> at
> org
> .apache.openejb.core.stateful.SimpleCache.checkIn(SimpleCache.java:
> 239)
> at
> org
> .apache
> .openejb
> .core
> .stateful.StatefulContainer.releaseInstance(StatefulContainer.java:
> 636)
> at org.apache.openejb.core.stateful.StatefulContainer.access
> $500(StatefulContainer.java:79)
> at org.apache.openejb.core.stateful.StatefulContainer
> $
> SessionSynchronizationCoordinator
> .afterCompletion(StatefulContainer.java:887)
> at org.apache.openejb.core.transaction.JtaTransactionPolicy
> $1.afterCompletion(JtaTransactionPolicy.java:155)
> at
> org
> .apache
> .geronimo
> .transaction
> .manager.TransactionImpl.afterCompletion(TransactionImpl.java:534)
> at
> org
> .apache
> .geronimo
> .transaction
> .manager.TransactionImpl.afterCompletion(TransactionImpl.java:526)
> at
> org
> .apache
> .geronimo
> .transaction.manager.TransactionImpl.commit(TransactionImpl.java:326)
> at
> org
> .apache
> .geronimo
> .transaction
> .manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:
> 245)
> at
> org
> .apache
> .openejb
> .core
> .transaction
> .JtaTransactionPolicy.completeTransaction(JtaTransactionPolicy.java:
> 291)
> at
> org
> .apache.openejb.core.transaction.TxRequired.commit(TxRequired.java:71)
> at
> org
> .apache
> .openejb
> .core
> .transaction.EjbTransactionUtil.afterInvoke(EjbTransactionUtil.java:
> 74)
> at
> org
> .apache
> .openejb
> .core.stateful.StatefulContainer.afterInvoke(StatefulContainer.java:
> 692)
> at
> org
> .apache
> .openejb
> .core
> .stateful.StatefulContainer.businessMethod(StatefulContainer.java:495)
> at
> org
> .apache
> .openejb
> .core.stateful.StatefulContainer.invoke(StatefulContainer.java:267)
> at
> org
> .apache
> .openejb
> .core
> .ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:
> 217)
> at
> org
> .apache
> .openejb
> .core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
> at
> org
> .apache
> .openejb
> .core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:286)
> at $Proxy154.findOrganizationalUnitMembers(Unknown Source)
> 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:585)
> at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
> at
> org
> .jboss
> .seam
> .intercept.RootInvocationContext.proceed(RootInvocationContext.java:
> 31)
> at org.jboss.seam.intercept.ClientSideInterceptor
> $1.proceed(ClientSideInterceptor.java:76)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 56)
> at
> org
> .jboss
> .seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:43)
> at
> org
> .jboss
> .seam
> .intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:
> 68)
> at
> org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:
> 107)
> at
> org
> .jboss
> .seam
> .intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
> at org.javassist.tmp.java.lang.Object_$
> $_javassist_45.findOrganizationalUnitMembers(Object_$
> $_javassist_45.java)
> at
> t4
> .core.commons.organization.facade.test.OrganizationFacadeServiceTest
> $12.testComponents(OrganizationFacadeServiceTest.java:681)
> at org.jboss.seam.mock.AbstractSeamTest
> $ComponentTest.run(AbstractSeamTest.java:162)
> at
> t4
> .core
> .commons
> .organization
> .facade
> .test
> .OrganizationFacadeServiceTest
> .testFindOrganizationalUnitMembers
> (OrganizationFacadeServiceTest.java:678)
> 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:585)
> at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:
> 580)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:478)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:607)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:874)
> at
> org
> .testng
> .internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:
> 125)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:
> 109)
> at org.testng.TestRunner.runWorkers(TestRunner.java:689)
> at org.testng.TestRunner.privateRun(TestRunner.java:566)
> at org.testng.TestRunner.run(TestRunner.java:466)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:301)
> at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:296)
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:276)
> at org.testng.SuiteRunner.run(SuiteRunner.java:191)
> at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:808)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:776)
> at org.testng.TestNG.run(TestNG.java:701)
> at
> org
> .apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:
> 77)
> at
> org
> .apache
> .maven
> .surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:
> 92)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
> 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:585)
> at
> org
> .apache
> .maven
> .surefire
> .booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:334)
> at
> org
> .apache
> .maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:980)
> Caused by: java.io.NotSerializableException:
> org.apache.openejb.persistence.JtaEntityManager
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> 1081)
> at
> java
> .io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:
> 1375)
> at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
> 1347)
> at
> java
> .io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
> 1290)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> 1079)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:
> 302)
> at
> org
> .apache.openejb.util.PojoSerialization.write(PojoSerialization.java:
> 134)
> at
> org
> .apache
> .openejb.util.PojoSerialization.writeObject(PojoSerialization.java:65)
> 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:585)
> at
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:
> 917)
> at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
> 1339)
> at
> java
> .io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
> 1290)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> 1079)
> at
> java
> .io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:
> 1375)
> at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
> 1347)
> at
> java
> .io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
> 1290)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> 1079)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:
> 302)
> at
> org
> .apache
> .openejb
> .core.stateful.SimplePassivater.passivate(SimplePassivater.java:70)
> ... 67 more
>
>
> I desperately try to understand what happens for a few days, so any
> help will be very welcome ;)
>
> Sorry for this long post, but not very easy to explain what happens
> since my architecture is a bit complex :(
>
> Regards,
>
> Olivier
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message