4 Replies Latest reply on Oct 25, 2012 10:52 AM by Ramesh Reddy

    (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:4a0 status: ActionStatus.ABORTED >)

    allen li Newbie

      Hi all,

       

                We meet a question. When we use hibertnate to save and search, Teiid throw a exception sometimes.

      (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:4a0 status: ActionStatus.ABORTED >)

       

                I checked log of teiid. I found: At 10:10:09, we meet this exception. But at 09:11:06: I found this session has been canceled successfully.

      Our code like that.This is just mock code.  We can see that it can throw exception at underline sometime.

       

       

                I can not confirm why this will throw exception.  Do you help me to analyse it?

       

      Thanks

       

       

      SessionFactory sessionfactory = cfg.buildSessionFactory();

       

              Transaction tx = null;

           try{

      Session session = sessionfactory.openSession();

      tx = session.beginTransaction();

       

       

      String entityName = "example.MobType";

      List results = session.createCriteria(entityName).setMaxResults(1).

       

      Item item = new Item();

                  item.setItmId("aaaaaaaaaaaaaaaa"+i);

                  item.setItmCreateTimestamp(new Date());

                  session.save(item);

       

       

       

      String entityName = "example.MobType";

      List results = session.createCriteria(entityName).setMaxResults(1).

       

       

      tx.commit();}

      catch{

      if(tx != null)

      tx.rollback();

      }

      finally{

      if(session !=null)

      {

           session.close();

      }

      }

       

       

      //////////////////////////////////

      ////  log               ////////

      /////////////////////////////////

       

       

       

       

      2011-03-17 09:11:06,840 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-12) [com.arjuna.ats.arjuna.coordinator.TransactionReaper_18] - TransactionReaper::check timeout for TX 10105ce2:b25a:4d81b90b:4a0 in state  RUN

      2011-03-17 09:11:06,847 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Thread-13) [com.arjuna.ats.arjuna.coordinator.TransactionReaper_7] - TransactionReaper::doCancellations worker Thread[Thread-13,5,jboss] successfully canceled TX 10105ce2:b25a:4d81b90b:4a0

      .............

      .............

      .............

      2011-03-17 10:10:09,461 WARN  [org.teiid.CONNECTOR] (Worker108_QueryProcessorQueue3719) Connector worker process failed for atomic-request=+JRS9OmxjMCo.1.3.3447

      [TranslatorException] 0: Error Code:0 Message:Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:4a0 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:4a0 status: ActionStatus.ABORTED >)

      1 [NestedSQLException]Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:4a0 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:4a0 status: ActionStatus.ABORTED >)

      2 [ResourceException]Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:4a0 status: ActionStatus.ABORTED >

          at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:247)

          at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:80)

          at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:198)

          at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:281)

          at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:211)

          at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:154)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:161)

          at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:150)

          at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:105)

          at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:70)

          at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:69)

          at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:82)

          at org.teiid.common.buffer.AbstractTupleSource.hasNext(AbstractTupleSource.java:91)

          at org.teiid.query.processor.proc.ProcedurePlan.executePlan(ProcedurePlan.java:447)

          at org.teiid.query.processor.proc.CreateCursorResultSetInstruction.process(CreateCursorResultSetInstruction.java:68)

          at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:301)

          at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:240)

          at org.teiid.query.processor.relational.PlanExecutionNode.nextBatchDirect(PlanExecutionNode.java:118)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:162)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:161)

          at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:150)

          at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:105)

          at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:115)

          at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:250)

          at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:184)

          at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)

          at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188)

          at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:116)

          at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:290)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

          at java.lang.Thread.run(Thread.java:636)

      Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:4a0 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:4a0 status: ActionStatus.ABORTED >)

          at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)

          at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:245)

          ... 34 more

      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:4a0 status: ActionStatus.ABORTED >

          at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:370)

          at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)

          at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)

          at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)

          ... 35 more

      2011-03-17 10:10:09,462 WARN  [org.teiid.PROCESSOR] (Worker108_QueryProcessorQueue3719) Processing exception 'Error Code:0 Message:Error Code:0 Message:Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:4a0 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:4a0 status: ActionStatus.ABORTED >)' for request +JRS9OmxjMCo.1.  Exception type org.teiid.core.TeiidProcessingException thrown from org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:370). Enable more detailed logging to see the entire stacktrace.

      2011-03-17 10:10:09,651 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] (Worker108_QueryProcessorQueue3720) [com.arjuna.ats.arjuna.coordinator.BasicAction_40] - Abort called on already aborted atomic action 10105ce2:b25a:4d81b90b:4a0

      2011-03-17 10:10:26,256 WARN  [org.teiid.CONNECTOR] (Worker108_QueryProcessorQueue3721) Connector worker process failed for atomic-request=tvN4TxbL/WML.11.7.3448

      [TranslatorException] 0: Error Code:0 Message:Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:a61 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:a61 status: ActionStatus.ABORTED >)

      1 [NestedSQLException]Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:a61 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:a61 status: ActionStatus.ABORTED >)

      2 [ResourceException]Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:a61 status: ActionStatus.ABORTED >

          at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:247)

          at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:80)

          at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:198)

          at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:281)

          at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:211)

          at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:154)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.relational.UnionAllNode.nextBatchDirect(UnionAllNode.java:90)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.relational.SelectNode.nextBatchDirect(SelectNode.java:96)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:70)

          at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:69)

          at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:82)

          at org.teiid.common.buffer.AbstractTupleSource.nextTuple(AbstractTupleSource.java:48)

          at org.teiid.query.processor.relational.SortUtility.initialSort(SortUtility.java:214)

          at org.teiid.query.processor.relational.SortUtility.sort(SortUtility.java:168)

          at org.teiid.query.processor.relational.SourceState.sort(SourceState.java:193)

          at org.teiid.query.processor.relational.MergeJoinStrategy.loadLeft(MergeJoinStrategy.java:328)

          at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:182)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:162)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:161)

          at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:150)

          at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:105)

          at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:115)

          at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:250)

          at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:184)

          at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)

          at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188)

          at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:116)

          at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:290)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

          at java.lang.Thread.run(Thread.java:636)

      Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:a61 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:a61 status: ActionStatus.ABORTED >)

          at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)

          at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:245)

          ... 35 more

      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:a61 status: ActionStatus.ABORTED >

          at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:370)

          at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)

          at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)

          at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)

          ... 36 more

      2011-03-17 10:10:26,256 WARN  [org.teiid.CONNECTOR] (Worker105_QueryProcessorQueue3722) Connector worker process failed for atomic-request=2HgqxTGIl4Ve.11.7.3450

      [TranslatorException] 0: Error Code:0 Message:Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:adb status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:adb status: ActionStatus.ABORTED >)

      1 [NestedSQLException]Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:adb status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:adb status: ActionStatus.ABORTED >)

      2 [ResourceException]Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:adb status: ActionStatus.ABORTED >

          at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:247)

          at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:80)

          at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:198)

          at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:281)

          at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:211)

          at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:154)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.relational.UnionAllNode.nextBatchDirect(UnionAllNode.java:90)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.relational.SelectNode.nextBatchDirect(SelectNode.java:96)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:70)

          at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:69)

          at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:82)

          at org.teiid.common.buffer.AbstractTupleSource.nextTuple(AbstractTupleSource.java:48)

          at org.teiid.query.processor.relational.SortUtility.initialSort(SortUtility.java:214)

          at org.teiid.query.processor.relational.SortUtility.sort(SortUtility.java:168)

          at org.teiid.query.processor.relational.SourceState.sort(SourceState.java:193)

          at org.teiid.query.processor.relational.MergeJoinStrategy.loadLeft(MergeJoinStrategy.java:328)

          at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:182)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:162)

          at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)

          at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:161)

          at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:150)

          at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:105)

          at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:115)

          at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:250)

          at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:184)

          at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)

          at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188)

          at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:116)

          at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:290)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

          at java.lang.Thread.run(Thread.java:636)

      Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:adb status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:adb status: ActionStatus.ABORTED >)

          at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)

          at org.teiid.translator.jdbc.JDBCExecutionFactory.getConnection(JDBCExecutionFactory.java:245)

          ... 35 more

      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:adb status: ActionStatus.ABORTED >

          at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:370)

          at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)

          at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)

          at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)

          ... 36 more

      2011-03-17 10:10:26,257 WARN  [org.teiid.PROCESSOR] (Worker108_QueryProcessorQueue3721) Processing exception 'Error Code:0 Message:Error Code:0 Message:Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:a61 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 10105ce2:b25a:4d81b90b:a61 status: ActionStatus.ABORTED >)' for request tvN4TxbL/WML.11.  Exception type org.teiid.core.TeiidProcessingException thrown from org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:370). Enable more detailed logging to see the entire stacktrace.