javax.ejb.EJBException: null Embedded Exception null

Oracle Community | 3004 | 1 decade ago
  1. 0

    SequenceFactory == null with jboss/kodo

    Oracle Community | 1 decade ago | 3004
    javax.ejb.EJBException: null Embedded Exception null
  2. 0

    Deploy a MessageBean that is using BMT. The following sequence of events in the onMessage() method will cause the IllegalStateException: 1. create TransactionTemplate with PROPAGATION_REQUIRED 2. in the execute do this: 2a. Connection conn = DataSourceUtils.getConnection(ds); 2b. DataSourceUtils.releaseConnection(conn, ds); 2c. call method that does the following: I. create TransactionTemplate with PROPAGATION_REQUIRES_NEW II. call execute and the exception is thrown. Here is the debug and stacktrace: 12:03:50,703 INFO [STDOUT] MyMessageBean got message! 12:03:50,705 INFO [STDOUT] // obtain DataSource 12:03:50,707 INFO [STDOUT] *** Create TransactionManager 12:03:50,900 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Retrieving JTA UserTransaction from JNDI location [java:comp/UserTransaction] 12:03:50,901 DEBUG [org.springframework.jndi.JndiTemplate] Looking up JNDI object with name [java:comp/UserTransaction] 12:03:50,981 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Retrieving JTA TransactionManager from JNDI location [java:/TransactionManager] 12:03:50,983 DEBUG [org.springframework.jndi.JndiTemplate] Looking up JNDI object with name [java:/TransactionManager] 12:03:50,985 INFO [org.springframework.transaction.jta.JtaTransactionManager] Using JTA UserTransaction: org.jboss.ejb.EnterpriseContext$UserTransactionImpl@66d882 12:03:50,987 INFO [org.springframework.transaction.jta.JtaTransactionManager] Using JTA TransactionManager: org.jboss.tm.TxManager@104e65 12:03:50,988 INFO [STDOUT] *** Create TransactionTemplate 12:03:50,997 INFO [STDOUT] *** Propagation=0 12:03:51,005 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Using transaction object [org.springframework.transaction.jta.JtaTransactionObject@401ab1] 12:03:51,007 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Creating new transaction with name [null] 12:03:51,017 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Initializing transaction synchronization 12:03:51,026 INFO [STDOUT] *** doInTransaction org.springframework.transaction.support.DefaultTransactionStatus@bc60f2 12:03:51,056 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] Fetching JDBC Connection from DataSource 12:03:53,260 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] Registering transaction synchronization for JDBC Connection 12:03:53,419 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Bound value [org.springframework.jdbc.datasource.ConnectionHolder@2900c9] for key [org.jboss.resource.adapter.jdbc.WrapperDataSource@bf2c98] to thread [JMS SessionPool Worker-0] 12:03:53,420 INFO [STDOUT] *** doInConnection 12:03:53,420 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@2900c9] for key [org.jboss.resource.adapter.jdbc.WrapperDataSource@bf2c98] bound to thread [JMS SessionPool Worker-0] 12:03:53,421 INFO [STDOUT] === Create TransactionTemplate 2 12:03:53,422 INFO [STDOUT] === Propagation=3 12:03:53,424 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Using transaction object [org.springframework.transaction.jta.JtaTransactionObject@1548ee] 12:03:53,424 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Suspending current transaction, creating new transaction with name [null] 12:03:53,425 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Removed value [org.springframework.jdbc.datasource.ConnectionHolder@2900c9] for key [org.jboss.resource.adapter.jdbc.WrapperDataSource@bf2c98] from thread [JMS SessionPool Worker-0] 12:03:53,433 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Clearing transaction synchronization 12:03:53,438 DEBUG [org.springframework.transaction.support.TransactionTemplate] Initiating transaction rollback on application exception java.lang.IllegalStateException: Trying to change transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=samoa.local/20, BranchQual=, localId=20] in enlist! at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:551) at org.jboss.resource.connectionmanager.TxConnectionManager.transactionStarted(TxConnectionManager.java:357) at org.jboss.resource.connectionmanager.CachedConnectionManager.userTransactionStarted(CachedConnectionManager.java:403) at org.jboss.ejb.EnterpriseContext$UserTransactionImpl.begin(EnterpriseContext.java:576) at org.springframework.transaction.jta.JtaTransactionManager.doJtaBegin(JtaTransactionManager.java:664) at org.springframework.transaction.jta.JtaTransactionManager.doBegin(JtaTransactionManager.java:622) at org.springframework.transaction.support.AbstractPlatformTransactionManager.handleExistingTransaction(AbstractPlatformTransactionManager.java:320) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:262) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:111) at com.springdeveloper.ejb.MyMessageBean.testSpring2(MyMessageBean.java:95) at com.springdeveloper.ejb.MyMessageBean.access$100(MyMessageBean.java:24) at com.springdeveloper.ejb.MyMessageBean$1.doInTransactionWithoutResult(MyMessageBean.java:80) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:114) at com.springdeveloper.ejb.MyMessageBean.testSpring(MyMessageBean.java:71) at com.springdeveloper.ejb.MyMessageBean.onMessage(MyMessageBean.java:54) 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.invocation.Invocation.performCall(Invocation.java:345) at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149) at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106) at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158) at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32) at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101) at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389) at org.jboss.ejb.Container.invoke(Container.java:873) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077) at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379) at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256) at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904) at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160) at org.jboss.mq.SpySession.run(SpySession.java:333) at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:613) 12:03:53,447 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Triggering beforeCompletion synchronization 12:03:53,448 ERROR [org.springframework.transaction.support.TransactionTemplate] Application exception overridden by rollback exception java.lang.IllegalStateException: Trying to change transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=samoa.local/20, BranchQual=, localId=20] in enlist! at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:551) at org.jboss.resource.connectionmanager.TxConnectionManager.transactionStarted(TxConnectionManager.java:357) at org.jboss.resource.connectionmanager.CachedConnectionManager.userTransactionStarted(CachedConnectionManager.java:403) at org.jboss.ejb.EnterpriseContext$UserTransactionImpl.begin(EnterpriseContext.java:576) at org.springframework.transaction.jta.JtaTransactionManager.doJtaBegin(JtaTransactionManager.java:664) at org.springframework.transaction.jta.JtaTransactionManager.doBegin(JtaTransactionManager.java:622) at org.springframework.transaction.support.AbstractPlatformTransactionManager.handleExistingTransaction(AbstractPlatformTransactionManager.java:320) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:262) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:111) at com.springdeveloper.ejb.MyMessageBean.testSpring2(MyMessageBean.java:95) at com.springdeveloper.ejb.MyMessageBean.access$100(MyMessageBean.java:24) at com.springdeveloper.ejb.MyMessageBean$1.doInTransactionWithoutResult(MyMessageBean.java:80) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:114) at com.springdeveloper.ejb.MyMessageBean.testSpring(MyMessageBean.java:71) at com.springdeveloper.ejb.MyMessageBean.onMessage(MyMessageBean.java:54) 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.invocation.Invocation.performCall(Invocation.java:345) at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149) at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106) at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158) at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32) at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101) at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389) at org.jboss.ejb.Container.invoke(Container.java:873) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077) at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379) at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256) at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904) at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160) at org.jboss.mq.SpySession.run(SpySession.java:333) at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:613) 12:03:53,461 INFO [org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@d698d3 java.lang.Throwable: STACKTRACE at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:333) at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:482) at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:107) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) at com.springdeveloper.ejb.MyMessageBean$1.doInTransactionWithoutResult(MyMessageBean.java:76) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:114) at com.springdeveloper.ejb.MyMessageBean.testSpring(MyMessageBean.java:71) at com.springdeveloper.ejb.MyMessageBean.onMessage(MyMessageBean.java:54) 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.invocation.Invocation.performCall(Invocation.java:345) at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149) at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106) at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158) at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32) at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101) at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389) at org.jboss.ejb.Container.invoke(Container.java:873) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077) at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379) at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256) at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904) at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160) at org.jboss.mq.SpySession.run(SpySession.java:333) at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:613) 12:03:53,473 ERROR [org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT] Application error: BMT stateless bean MyMessageBean should complete transactions before returning (ejb1.1 spec, 11.6.1) 12:03:53,478 ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Exception in JMSCI message listener javax.ejb.EJBException: null; CausedByException is: Application error: BMT stateless bean MyMessageBean should complete transactions before returning (ejb1.1 spec, 11.6.1) at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:411) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:196) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389) at org.jboss.ejb.Container.invoke(Container.java:873) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077) at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379) at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256) at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904) at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160) at org.jboss.mq.SpySession.run(SpySession.java:333) at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:613) java.rmi.RemoteException: Application error: BMT stateless bean MyMessageBean should complete transactions before returning (ejb1.1 spec, 11.6.1) at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.checkStatelessDone(AbstractTxInterceptorBMT.java:225) at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:165) at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32) at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101) at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389) at org.jboss.ejb.Container.invoke(Container.java:873) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077) at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379) at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256) at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904) at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160) at org.jboss.mq.SpySession.run(SpySession.java:333) at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:613)

    Spring JIRA | 8 years ago | Yogesh
    javax.ejb.EJBException: null; CausedByException is: Application error: BMT stateless bean MyMessageBean should complete transactions before returning (ejb1.1 spec, 11.6.1)
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    JBoss Community / Mailing Lists

    sourceforge.net | 7 months ago
    javax.ejb.EJBException: RuntimeException; CausedByException is: null
  5. 0

    Deploy a MessageBean that is using BMT. The following sequence of events in the onMessage() method will cause the IllegalStateException: 1. create TransactionTemplate with PROPAGATION_REQUIRED 2. in the execute do this: 2a. Connection conn = DataSourceUtils.getConnection(ds); 2b. DataSourceUtils.releaseConnection(conn, ds); 2c. call method that does the following: I. create TransactionTemplate with PROPAGATION_REQUIRES_NEW II. call execute and the exception is thrown. Here is the debug and stacktrace: 12:03:50,703 INFO [STDOUT] MyMessageBean got message! 12:03:50,705 INFO [STDOUT] // obtain DataSource 12:03:50,707 INFO [STDOUT] *** Create TransactionManager 12:03:50,900 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Retrieving JTA UserTransaction from JNDI location [java:comp/UserTransaction] 12:03:50,901 DEBUG [org.springframework.jndi.JndiTemplate] Looking up JNDI object with name [java:comp/UserTransaction] 12:03:50,981 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Retrieving JTA TransactionManager from JNDI location [java:/TransactionManager] 12:03:50,983 DEBUG [org.springframework.jndi.JndiTemplate] Looking up JNDI object with name [java:/TransactionManager] 12:03:50,985 INFO [org.springframework.transaction.jta.JtaTransactionManager] Using JTA UserTransaction: org.jboss.ejb.EnterpriseContext$UserTransactionImpl@66d882 12:03:50,987 INFO [org.springframework.transaction.jta.JtaTransactionManager] Using JTA TransactionManager: org.jboss.tm.TxManager@104e65 12:03:50,988 INFO [STDOUT] *** Create TransactionTemplate 12:03:50,997 INFO [STDOUT] *** Propagation=0 12:03:51,005 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Using transaction object [org.springframework.transaction.jta.JtaTransactionObject@401ab1] 12:03:51,007 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Creating new transaction with name [null] 12:03:51,017 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Initializing transaction synchronization 12:03:51,026 INFO [STDOUT] *** doInTransaction org.springframework.transaction.support.DefaultTransactionStatus@bc60f2 12:03:51,056 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] Fetching JDBC Connection from DataSource 12:03:53,260 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] Registering transaction synchronization for JDBC Connection 12:03:53,419 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Bound value [org.springframework.jdbc.datasource.ConnectionHolder@2900c9] for key [org.jboss.resource.adapter.jdbc.WrapperDataSource@bf2c98] to thread [JMS SessionPool Worker-0] 12:03:53,420 INFO [STDOUT] *** doInConnection 12:03:53,420 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@2900c9] for key [org.jboss.resource.adapter.jdbc.WrapperDataSource@bf2c98] bound to thread [JMS SessionPool Worker-0] 12:03:53,421 INFO [STDOUT] === Create TransactionTemplate 2 12:03:53,422 INFO [STDOUT] === Propagation=3 12:03:53,424 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Using transaction object [org.springframework.transaction.jta.JtaTransactionObject@1548ee] 12:03:53,424 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Suspending current transaction, creating new transaction with name [null] 12:03:53,425 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Removed value [org.springframework.jdbc.datasource.ConnectionHolder@2900c9] for key [org.jboss.resource.adapter.jdbc.WrapperDataSource@bf2c98] from thread [JMS SessionPool Worker-0] 12:03:53,433 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Clearing transaction synchronization 12:03:53,438 DEBUG [org.springframework.transaction.support.TransactionTemplate] Initiating transaction rollback on application exception java.lang.IllegalStateException: Trying to change transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=samoa.local/20, BranchQual=, localId=20] in enlist! at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:551) at org.jboss.resource.connectionmanager.TxConnectionManager.transactionStarted(TxConnectionManager.java:357) at org.jboss.resource.connectionmanager.CachedConnectionManager.userTransactionStarted(CachedConnectionManager.java:403) at org.jboss.ejb.EnterpriseContext$UserTransactionImpl.begin(EnterpriseContext.java:576) at org.springframework.transaction.jta.JtaTransactionManager.doJtaBegin(JtaTransactionManager.java:664) at org.springframework.transaction.jta.JtaTransactionManager.doBegin(JtaTransactionManager.java:622) at org.springframework.transaction.support.AbstractPlatformTransactionManager.handleExistingTransaction(AbstractPlatformTransactionManager.java:320) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:262) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:111) at com.springdeveloper.ejb.MyMessageBean.testSpring2(MyMessageBean.java:95) at com.springdeveloper.ejb.MyMessageBean.access$100(MyMessageBean.java:24) at com.springdeveloper.ejb.MyMessageBean$1.doInTransactionWithoutResult(MyMessageBean.java:80) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:114) at com.springdeveloper.ejb.MyMessageBean.testSpring(MyMessageBean.java:71) at com.springdeveloper.ejb.MyMessageBean.onMessage(MyMessageBean.java:54) 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.invocation.Invocation.performCall(Invocation.java:345) at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149) at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106) at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158) at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32) at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101) at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389) at org.jboss.ejb.Container.invoke(Container.java:873) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077) at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379) at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256) at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904) at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160) at org.jboss.mq.SpySession.run(SpySession.java:333) at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:613) 12:03:53,447 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Triggering beforeCompletion synchronization 12:03:53,448 ERROR [org.springframework.transaction.support.TransactionTemplate] Application exception overridden by rollback exception java.lang.IllegalStateException: Trying to change transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=samoa.local/20, BranchQual=, localId=20] in enlist! at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:551) at org.jboss.resource.connectionmanager.TxConnectionManager.transactionStarted(TxConnectionManager.java:357) at org.jboss.resource.connectionmanager.CachedConnectionManager.userTransactionStarted(CachedConnectionManager.java:403) at org.jboss.ejb.EnterpriseContext$UserTransactionImpl.begin(EnterpriseContext.java:576) at org.springframework.transaction.jta.JtaTransactionManager.doJtaBegin(JtaTransactionManager.java:664) at org.springframework.transaction.jta.JtaTransactionManager.doBegin(JtaTransactionManager.java:622) at org.springframework.transaction.support.AbstractPlatformTransactionManager.handleExistingTransaction(AbstractPlatformTransactionManager.java:320) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:262) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:111) at com.springdeveloper.ejb.MyMessageBean.testSpring2(MyMessageBean.java:95) at com.springdeveloper.ejb.MyMessageBean.access$100(MyMessageBean.java:24) at com.springdeveloper.ejb.MyMessageBean$1.doInTransactionWithoutResult(MyMessageBean.java:80) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:114) at com.springdeveloper.ejb.MyMessageBean.testSpring(MyMessageBean.java:71) at com.springdeveloper.ejb.MyMessageBean.onMessage(MyMessageBean.java:54) 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.invocation.Invocation.performCall(Invocation.java:345) at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149) at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106) at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158) at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32) at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101) at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389) at org.jboss.ejb.Container.invoke(Container.java:873) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077) at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379) at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256) at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904) at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160) at org.jboss.mq.SpySession.run(SpySession.java:333) at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:613) 12:03:53,461 INFO [org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@d698d3 java.lang.Throwable: STACKTRACE at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:333) at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:482) at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:107) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) at com.springdeveloper.ejb.MyMessageBean$1.doInTransactionWithoutResult(MyMessageBean.java:76) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:114) at com.springdeveloper.ejb.MyMessageBean.testSpring(MyMessageBean.java:71) at com.springdeveloper.ejb.MyMessageBean.onMessage(MyMessageBean.java:54) 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.invocation.Invocation.performCall(Invocation.java:345) at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149) at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106) at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158) at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32) at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101) at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389) at org.jboss.ejb.Container.invoke(Container.java:873) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077) at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379) at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256) at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904) at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160) at org.jboss.mq.SpySession.run(SpySession.java:333) at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:613) 12:03:53,473 ERROR [org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT] Application error: BMT stateless bean MyMessageBean should complete transactions before returning (ejb1.1 spec, 11.6.1) 12:03:53,478 ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Exception in JMSCI message listener javax.ejb.EJBException: null; CausedByException is: Application error: BMT stateless bean MyMessageBean should complete transactions before returning (ejb1.1 spec, 11.6.1) at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:411) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:196) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389) at org.jboss.ejb.Container.invoke(Container.java:873) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077) at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379) at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256) at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904) at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160) at org.jboss.mq.SpySession.run(SpySession.java:333) at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:613) java.rmi.RemoteException: Application error: BMT stateless bean MyMessageBean should complete transactions before returning (ejb1.1 spec, 11.6.1) at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.checkStatelessDone(AbstractTxInterceptorBMT.java:225) at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:165) at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32) at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101) at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389) at org.jboss.ejb.Container.invoke(Container.java:873) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077) at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379) at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256) at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904) at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160) at org.jboss.mq.SpySession.run(SpySession.java:333) at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743) at java.lang.Thread.run(Thread.java:613)

    Spring JIRA | 8 years ago | Yogesh
    javax.ejb.EJBException: null; CausedByException is: Application error: BMT stateless bean MyMessageBean should complete transactions before returning (ejb1.1 spec, 11.6.1)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.ejb.EJBException

      null Embedded Exception null

      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke()
    2. JBoss Application Server Server
      JMSContainerInvoker$MessageListenerImpl.onMessage
      1. org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:445)
      2. org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:88)
      3. org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
      4. org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:142)
      5. org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
      6. org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
      7. org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
      8. org.jboss.ejb.MessageDrivenContainer.invoke(MessageDrivenContainer.java:305)
      9. org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:625)
      10. org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:973)
      10 frames
    3. org.jboss.jms
      StdServerSession.onMessage
      1. org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:234)
      1 frame
    4. JBossMQ
      SpySession.run
      1. org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:559)
      2. org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:376)
      3. org.jboss.mq.SpySession.run(SpySession.java:218)
      3 frames
    5. org.jboss.jms
      StdServerSession.run
      1. org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:173)
      1 frame
    6. Dough Lea's util.concurrent package
      PooledExecutor$Worker.run
      1. EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:642)
      1 frame
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:479)
      1 frame