Hi Guys, I am very new to EJB 3.0
I have deployed a EAR in WebLogic 10.3 g which have two ejb modules called
- ServicesDump
- MessageDump
In ServicesDump i have a session bean which doing the database updates, After i have deployed, When i called these remote session-bean from out side of container to test the functionalites it working perfectly (Which mean updating the tables perfectly). That session bean have a transaction type is REQUIRED
.
In the MessageDump I have a MDB which listening the MQ ,and inside the onMessage()
of MDB I am calling the method of remote session bean (the same method which i have tested ).
The mdb 's transaction type I specified in ejb-jar.xml
as follows
transaction-type = Container
and
trans-attribute=Required
So when MDB started (When it consumes message from MQ) it calling the session bean method, but after it returns from the sessions bean method it throwing the following exception.
dminServer+172.22.221.124:7001+base_domain+t3+): weblogic.transaction.RollbackException: Unknown reason at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1834) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.ava:339) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:233) at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:591) at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:424) at .gts.foundry.txn.DatabaseBean_7z3dqu_DatabaseImpl.persist(DatabaseBean_7z3dqu_Dat abaseImpl.java:1607) at common.service.serviceimpl.LogServiceBean.processMqLog(LogServiceBean.java:89) 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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:310) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo inpoint(ReflectiveMethodInvocation.java:182) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:149) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doP roceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.inv oke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodI nvocationVisitorImpl.java:37) at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentI nterceptorCallbackImpl.java:54) at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(Environment Interceptor.java:50) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invok e(ExposeInvocationInterceptor.java:89) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doP roceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.inv oke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami cAopProxy.java:204) at $Proxy108.processMqLog(Unknown Source) at .common.service.serviceimpl.LogServiceBean_rq903m_LogServiceImpl.processMqLog (LogServiceBean_rq903m_LogServiceImpl.java:61) 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 weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.ja va:73) at $Proxy103.processMqLog(Unknown Source) at .baserate.mdb.OLTRateFeedMessageListener.onMessage(OLTRateFeedMessageListener .java:74) 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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:310) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo inpoint(ReflectiveMethodInvocation.java:182) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:149) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doP roceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.inv oke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invok e(ExposeInvocationInterceptor.java:89) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doP roceed(DelegatingIntroductionInterceptor.java:131) at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.inv oke(DelegatingIntroductionInterceptor.java:119) at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami cAopProxy.java:204) at $Proxy107.onMessage(Unknown Source) at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466) at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371) at weblogic.ejb.container.internal.NewJMSMessagePoller.processOneMessage(NewJMSMessagePoller .java:245) at weblogic.ejb.container.internal.NewJMSMessagePoller.run(NewJMSMessagePoller.java:121) at weblogic.ejb.container.internal.NewJMSMessagePoller.timerExpired(NewJMSMessagePoller.jav :204) at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.jav a:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: weblogic.transaction.internal.AppSetRollbackOnlyException at weblogic.transaction.internal.TransactionImpl.setRollbackOnly(TransactionImpl.java:551) at weblogic.transaction.internal.TransactionManagerImpl.setRollbackOnly(TransactionManagerIm pl.java:319) at weblogic.transaction.internal.TransactionManagerImpl.setRollbackOnly(TransactionManagerIm pl.java:312) at org.hibernate.ejb.AbstractEntityManagerImpl.markAsRollback(AbstractEntityManagerImpl.java :433) at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManag erImpl.java:588) at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManag erImpl.java:630) at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl. java:525) at weblogic.transaction.internal.ServerSCInfo.doBeforeCompletion(ServerSCInfo.java:1229) at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1204) at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:118 at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransac tionImpl.java:1310) at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImp l.java:2122) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl. java:266)
Please help me out to resolve it,