11 Replies Latest reply on Feb 11, 2013 2:56 PM by Shobhit Tyagi

    Transaction Problems jBPM5

    Shobhit Tyagi Master

      Hi community,

       

      I am stuck with an exception and I cant get out of it.

      I have 3 separate modules , a dynamic web project for view, EJB project for EJB and a simple jbpm java project.

      I use JSFs and session scope manage beans to call the EJBs using a service locator which calls the BPM APIs. When I try to complete the task it gives me the following exception. Any clue why I get the transaction exception. The exact same piece of code seems to work fine in a servlet container.

       

      The code that I use is

       

       

      public static void completeTask(long taskId, String userId) throws Exception
       {
      client = new TaskClient(new MinaTaskClientConnector("org.drools.process.workitem.wsht.WSHumanTaskHandler", new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
          boolean connected = client.connect(ipAddress, port);
          if (!connected)
          {
           throw new IllegalArgumentException("Could not connect task client");
          }
      
        BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
      
        ContentData contentData = null;
        try
        {
         client.complete(taskId, userId, contentData, responseHandler);
         responseHandler.waitTillDone(5000);
        }
        catch(Exception e)
        {
         BpmExceptionHandler.handleException(e);
        }
        finally
        {
         disconnect();
        }
       }
      
      

       

      And the stack trace is :

       

       

                                       javax.ejb.EJBException: Invalid bean state for EJB UserTransaction method
       at com.ibm.ejs.container.EJSContainer.getUserTransactionThreadData(EJSContainer.java:2211)
       at com.ibm.ejs.container.UserTransactionWrapper.begin(UserTransactionWrapper.java:171)
       at org.drools.persistence.jta.JtaTransactionManager.begin(JtaTransactionManager.java:165)
       at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:354)
       at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
       at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:307)
       at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
       at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
       at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
       at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
       at java.lang.Thread.run(Thread.java:770)
      [2/6/13 16:01:41:949 COT] 000000c0 SingleSession E org.drools.persistence.SingleSessionCommandService rollbackTransaction Could not commit session
                                       java.lang.RuntimeException: Unable to begin transaction
       at org.drools.persistence.jta.JtaTransactionManager.begin(JtaTransactionManager.java:169)
       at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:354)
       at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
       at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:307)
       at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
       at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
       at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
       at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
       at java.lang.Thread.run(Thread.java:770)
      Caused by: javax.ejb.EJBException: Invalid bean state for EJB UserTransaction method
       at com.ibm.ejs.container.EJSContainer.getUserTransactionThreadData(EJSContainer.java:2211)
       at com.ibm.ejs.container.UserTransactionWrapper.begin(UserTransactionWrapper.java:171)
       at org.drools.persistence.jta.JtaTransactionManager.begin(JtaTransactionManager.java:165)
       ... 26 more
      [2/6/13 16:01:41:959 COT] 000000be LoggingFilter I org.apache.mina.filter.logging.LoggingFilter log SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
      [2/6/13 16:01:41:959 COT] 000000be LoggingFilter I org.apache.mina.filter.logging.LoggingFilter log SENT: HeapBuffer[pos=0 lim=733 cap=1024: 00 00 02 D9 AC ED 00 05 73 72 01 00 1D 6F 72 67...]
      [2/6/13 16:01:41:959 COT] 000000be LoggingFilter I org.apache.mina.filter.logging.LoggingFilter log SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
      [2/6/13 16:01:41:969 COT] 000000c0 DMAdapter     I com.ibm.ws.ffdc.impl.DMAdapter getAnalysisEngine FFDC1009I: Analysis Engine using data base: C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv02\properties\logbr\ffdc\adv\ffdcdb.xml
      [2/6/13 16:01:41:969 COT] 000000c0 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv02\logs\ffdc\server1_589048b6_13.02.06_16.01.41.9595129469468389097673.txt com.ibm.tx.jta.impl.TranManagerImpl.setRollbackOnly 303
      [2/6/13 16:01:41:969 COT] 000000c0 JtaTransactio W org.drools.persistence.jta.JtaTransactionManager rollback Unable to rollback transaction
                                       java.lang.IllegalStateException: No transaction associated with this thread
       at com.ibm.tx.jta.impl.TranManagerImpl.setRollbackOnly(TranManagerImpl.java:346)
       at com.ibm.tx.jta.impl.TranManagerSet.setRollbackOnly(TranManagerSet.java:213)
       at com.ibm.tx.jta.impl.UserTransactionImpl.setRollbackOnly(UserTransactionImpl.java:278)
       at com.ibm.ejs.container.UserTransactionWrapper.setRollbackOnly(UserTransactionWrapper.java:393)
       at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:193)
       at org.drools.persistence.SingleSessionCommandService.rollbackTransaction(SingleSessionCommandService.java:402)
       at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:381)
       at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
       at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:307)
       at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
       at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
       at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
       at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
       at java.lang.Thread.run(Thread.java:770)
      [2/6/13 16:01:41:969 COT] 000000c0 SingleSession E org.drools.persistence.SingleSessionCommandService rollbackTransaction Could not rollback
                                       java.lang.RuntimeException: Unable to rollback transaction
       at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:197)
       at org.drools.persistence.SingleSessionCommandService.rollbackTransaction(SingleSessionCommandService.java:402)
       at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:381)
       at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
       at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:307)
       at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
       at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
       at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
       at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
       at java.lang.Thread.run(Thread.java:770)
      Caused by: java.lang.IllegalStateException: No transaction associated with this thread
       at com.ibm.tx.jta.impl.TranManagerImpl.setRollbackOnly(TranManagerImpl.java:346)
       at com.ibm.tx.jta.impl.TranManagerSet.setRollbackOnly(TranManagerSet.java:213)
       at com.ibm.tx.jta.impl.UserTransactionImpl.setRollbackOnly(UserTransactionImpl.java:278)
       at com.ibm.ejs.container.UserTransactionWrapper.setRollbackOnly(UserTransactionWrapper.java:393)
       at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:193)
       ... 27 more
      [2/6/13 16:01:41:979 COT] 000000c0 JtaTransactio W org.drools.persistence.jta.JtaTransactionManager begin Unable to begin transaction
                                       javax.ejb.EJBException: Invalid bean state for EJB UserTransaction method
       at com.ibm.ejs.container.EJSContainer.getUserTransactionThreadData(EJSContainer.java:2211)
       at com.ibm.ejs.container.UserTransactionWrapper.begin(UserTransactionWrapper.java:171)
       at org.drools.persistence.jta.JtaTransactionManager.begin(JtaTransactionManager.java:165)
       at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:354)
       at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
       at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:307)
       at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
       at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
       at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
       at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
       at java.lang.Thread.run(Thread.java:770)
      [2/6/13 16:01:41:979 COT] 000000c0 SingleSession E org.drools.persistence.SingleSessionCommandService rollbackTransaction Could not commit session
                                       java.lang.RuntimeException: Unable to begin transaction
       at org.drools.persistence.jta.JtaTransactionManager.begin(JtaTransactionManager.java:169)
       at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:354)
       at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
       at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:307)
       at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
       at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
       at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
       at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
       at java.lang.Thread.run(Thread.java:770)
      Caused by: javax.ejb.EJBException: Invalid bean state for EJB UserTransaction method
       at com.ibm.ejs.container.EJSContainer.getUserTransactionThreadData(EJSContainer.java:2211)
       at com.ibm.ejs.container.UserTransactionWrapper.begin(UserTransactionWrapper.java:171)
       at org.drools.persistence.jta.JtaTransactionManager.begin(JtaTransactionManager.java:165)
       ... 26 more
      [2/6/13 16:01:41:979 COT] 000000c0 JtaTransactio W org.drools.persistence.jta.JtaTransactionManager rollback Unable to rollback transaction
                                       java.lang.IllegalStateException: No transaction associated with this thread
       at com.ibm.tx.jta.impl.TranManagerImpl.setRollbackOnly(TranManagerImpl.java:346)
       at com.ibm.tx.jta.impl.TranManagerSet.setRollbackOnly(TranManagerSet.java:213)
       at com.ibm.tx.jta.impl.UserTransactionImpl.setRollbackOnly(UserTransactionImpl.java:278)
       at com.ibm.ejs.container.UserTransactionWrapper.setRollbackOnly(UserTransactionWrapper.java:393)
       at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:193)
       at org.drools.persistence.SingleSessionCommandService.rollbackTransaction(SingleSessionCommandService.java:402)
       at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:381)
       at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
       at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:307)
       at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
       at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
       at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
       at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
       at java.lang.Thread.run(Thread.java:770)
      [2/6/13 16:01:41:979 COT] 000000c0 SingleSession E org.drools.persistence.SingleSessionCommandService rollbackTransaction Could not rollback
                                       java.lang.RuntimeException: Unable to rollback transaction
       at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:197)
       at org.drools.persistence.SingleSessionCommandService.rollbackTransaction(SingleSessionCommandService.java:402)
       at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:381)
       at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
       at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:307)
       at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
       at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
       at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
       at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
       at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
       at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
       at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
       at java.lang.Thread.run(Thread.java:770)
      Caused by: java.lang.IllegalStateException: No transaction associated with this thread
       at com.ibm.tx.jta.impl.TranManagerImpl.setRollbackOnly(TranManagerImpl.java:346)
       at com.ibm.tx.jta.impl.TranManagerSet.setRollbackOnly(TranManagerSet.java:213)
       at com.ibm.tx.jta.impl.UserTransactionImpl.setRollbackOnly(UserTransactionImpl.java:278)
       at com.ibm.ejs.container.UserTransactionWrapper.setRollbackOnly(UserTransactionWrapper.java:393)
       at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:193)
       ... 27 more
      [2/6/13 16:01:41:969 COT] 000000c0 SystemErr     R java.lang.RuntimeException: Could not commit session or rollback
      [2/6/13 16:01:41:969 COT] 000000c0 SystemErr     R  at org.drools.persistence.SingleSessionCommandService.rollbackTransaction(SingleSessionCommandService.java:406)
      [2/6/13 16:01:41:969 COT] 000000c0 SystemErr     R  at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:381)
      [2/6/13 16:01:41:969 COT] 000000c0 SystemErr     R  at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
      [2/6/13 16:01:41:969 COT] 000000c0 SystemErr     R  at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:307)
      [2/6/13 16:01:41:969 COT] 000000c0 SystemErr     R  at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
      [2/6/13 16:01:41:969 COT] 000000c0 SystemErr     R  at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
      [2/6/13 16:01:41:969 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
      [2/6/13 16:01:41:969 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
      [2/6/13 16:01:41:969 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
      [2/6/13 16:01:41:969 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at java.lang.Thread.run(Thread.java:770)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R Caused by: java.lang.RuntimeException: Unable to rollback transaction
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:197)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.drools.persistence.SingleSessionCommandService.rollbackTransaction(SingleSessionCommandService.java:402)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  ... 26 more
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R Caused by: java.lang.IllegalStateException: No transaction associated with this thread
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at com.ibm.tx.jta.impl.TranManagerImpl.setRollbackOnly(TranManagerImpl.java:346)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at com.ibm.tx.jta.impl.TranManagerSet.setRollbackOnly(TranManagerSet.java:213)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at com.ibm.tx.jta.impl.UserTransactionImpl.setRollbackOnly(UserTransactionImpl.java:278)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at com.ibm.ejs.container.UserTransactionWrapper.setRollbackOnly(UserTransactionWrapper.java:393)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:193)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  ... 27 more
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R java.lang.RuntimeException: Could not commit session or rollback
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.drools.persistence.SingleSessionCommandService.rollbackTransaction(SingleSessionCommandService.java:406)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:381)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.drools.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:150)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedWSHumanTaskHandler.java:307)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:81)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.jbpm.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at java.lang.Thread.run(Thread.java:770)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R Caused by: java.lang.RuntimeException: Unable to rollback transaction
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:197)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.drools.persistence.SingleSessionCommandService.rollbackTransaction(SingleSessionCommandService.java:402)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  ... 26 more
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R Caused by: java.lang.IllegalStateException: No transaction associated with this thread
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at com.ibm.tx.jta.impl.TranManagerImpl.setRollbackOnly(TranManagerImpl.java:346)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at com.ibm.tx.jta.impl.TranManagerSet.setRollbackOnly(TranManagerSet.java:213)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at com.ibm.tx.jta.impl.UserTransactionImpl.setRollbackOnly(UserTransactionImpl.java:278)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at com.ibm.ejs.container.UserTransactionWrapper.setRollbackOnly(UserTransactionWrapper.java:393)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:193)
      [2/6/13 16:01:41:979 COT] 000000c0 SystemErr     R  ... 27 more
      
      

       

       

      I am not using Bitronix Transaction manager.

      My persistence looks like following :

       

       

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <persistence version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
      http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/persistence">
           
       <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
              <provider>org.hibernate.ejb.HibernatePersistence</provider>
              <jta-data-source>jndi/testDS1</jta-data-source>
              
       <class>org.drools.persistence.info.SessionInfo</class>
              <class>org.drools.persistence.info.WorkItemInfo</class>
              <class>org.jbpm.process.audit.ProcessInstanceLog</class>
              <class>org.jbpm.process.audit.NodeInstanceLog</class>
              <class>org.jbpm.process.audit.VariableInstanceLog</class>
           <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
              <class>org.jbpm.persistence.processinstance.ProcessInstanceEventInfo</class> 
               
              <class>org.jbpm.task.Task</class>
        <class>org.jbpm.task.Comment</class>
        <class>org.jbpm.task.Attachment</class>
        <class>org.jbpm.task.I18NText</class>
        <class>org.jbpm.task.SubTasksStrategy</class>
        <class>org.jbpm.task.Deadline</class>
        <class>org.jbpm.task.Escalation</class>
        <class>org.jbpm.task.Reassignment</class>
        <class>org.jbpm.task.Notification</class>
        <class>org.jbpm.task.BooleanExpression</class>
        <class>org.jbpm.task.User</class>
        <class>org.jbpm.task.PeopleAssignments</class>  
              <properties>
                  <property name="hibernate.connection.autocommit" value="true"/>
                  <property name="hibernate.max_fetch_depth" value="3"/>
                  <property name="hibernate.hbm2ddl.auto" value="update" />
                  <property name="hibernate.show_sql" value="false" />
                  <property name="hibernate.transaction.manager_lookup_class" value=" org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"/>
              </properties>
            
            
          </persistence-unit>
          <persistence-unit name="org.jbpm.task">
              <provider>org.hibernate.ejb.HibernatePersistence</provider>
              
              <class>org.jbpm.task.Attachment</class>
              <class>org.jbpm.task.Content</class>
              <class>org.jbpm.task.BooleanExpression</class>
              <class>org.jbpm.task.Comment</class>
              <class>org.jbpm.task.Deadline</class>
              <class>org.jbpm.task.Delegation</class>
              <class>org.jbpm.task.Escalation</class>
              <class>org.jbpm.task.Group</class>
              <class>org.jbpm.task.I18NText</class>
              <class>org.jbpm.task.Notification</class>
              <class>org.jbpm.task.EmailNotification</class>
              <class>org.jbpm.task.EmailNotificationHeader</class>
              <class>org.jbpm.task.PeopleAssignments</class>
              <class>org.jbpm.task.Reassignment</class>
              <class>org.jbpm.task.Status</class>
              <class>org.jbpm.task.Task</class>
              <class>org.jbpm.task.TaskData</class>
              <class>org.jbpm.task.SubTasksStrategy</class>
              <class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>
              <class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>
              <class>org.jbpm.task.User</class>
      
                 
              <class>org.drools.persistence.info.SessionInfo</class>
              <class>org.drools.persistence.info.WorkItemInfo</class>
           <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
              <class>org.jbpm.persistence.processinstance.ProcessInstanceEventInfo</class>
           
              <properties>
                   
                  <property name="hibernate.dialect" value="org.hibernate.dialect.DB2Dialect"/>
                  <property name="hibernate.connection.driver_class" value="com.ibm.db2.jcc.DB2Driver"/>
                  <property name="hibernate.connection.url" value="jdbc:db2://localhost:50000/jbpm5" />
                  <property name="hibernate.connection.username" value="S28249"/>
                  <property name="hibernate.connection.password" value="tyagiS"/>
                 
                  <property name="hibernate.connection.autocommit" value="true" />
                  <property name="hibernate.max_fetch_depth" value="3"/>
                  <property name="hibernate.hbm2ddl.auto" value="update" />
                  <property name="hibernate.show_sql" value="false" />
                   <property name="hibernate.transaction.manager_lookup_class" value=" org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"/>
              </properties>
          </persistence-unit>
      </persistence>
      
      
        • 1. Re: Transaction Problems jBPM5
          Shobhit Tyagi Master

          Any help here please. I have been stuck with this for 2 days now and have tried putting User Transaction almost everywhere in the code. Thanks

          • 2. Re: Transaction Problems jBPM5
            vchmakov Newbie

            When completing the task Task Handler may create a separate thread for this. The session reference is passed to that thread, but the thread does not have a persistence context associated with it. That what I think is going on, but I’m not 100% positive. I have been fighting similar issue a few month back and ended up rewriting the handler to execute the work in the same thread. Also, you might want to look at the set of properties of the handler which may control this behavior.

             

            HTH

             

            Vladimir

            1 of 1 people found this helpful
            • 3. Re: Transaction Problems jBPM5
              Maciej Swiderski Master

              As Vladimir has already mentioned this is most likely caused by additional thread (non ee managed thread) started to completeWorkItem after task was completed. As WebSphere does not allow to access UserTransaction from a non managed thread thus you run into that issue. When using EJB I would recommend to use on of the following strategies for task service:

              - use local task service that will participate in the same transaction as runtime engine and no additional threads will be created

              - use JMS as message transport between runtime engine and task service using EJB (stateless to send messages and MDB to receive and process messages)

               

              HTH

              1 of 1 people found this helpful
              • 4. Re: Transaction Problems jBPM5
                Shobhit Tyagi Master

                Thanks Guys. Really helpful answers.

                I tried to use the HornetQTaskHandler instead of MinaTaskHandler. I guess the transactions are managed in the human task war as i didnot write any transaction in the code and yet it works and everything.

                Just another question not regarding the transactions but the HornetQHandler. I started the process and the task goes in to the Created state and is not assigned to the user that I have specified in the process definition. Is it working correctly? If yes then how do I make sure that immediately when the process starts, the task is assigned to the user and is not in Created state but in Reserved state.

                 

                And the same thing happens when I complete the task. If I start a process using MinaTaskHandler, it assigns the task to the user. I complete the task using HornetQ but it completes the task and the next task is not assigned. Next task stays in the Created state. I might be missing some piece of code here?

                 

                This is what I do to complete a task :

                 

                 

                public static void completeTask(long taskId, String userId) throws Exception
                 {
                  String name = "client 1"+UUID.randomUUID();
                  TaskClient client = new TaskClient(new HornetQTaskClientConnector(name, new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
                  BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
                  ContentData contentData = null;
                  client.connect(ipAddress, port);
                  try
                  {
                   client.complete(taskId, userId, contentData, responseHandler);
                   responseHandler.waitTillDone(5000);
                  }
                  catch(Exception e)
                  {
                   BpmExceptionHandler.handleException(e);
                  }
                  finally
                  {
                   if(client != null)
                    client.disconnect();
                  }
                 }
                
                
                • 5. Re: Transaction Problems jBPM5
                  vchmakov Newbie

                  Could you please try to call client.start() before client.complete(). Does it make a difference?

                   

                  Thanks,

                   

                  Vladimir

                  • 6. Re: Transaction Problems jBPM5
                    Shobhit Tyagi Master

                    Vladimir,

                     

                    I call start and then complete. It just completes the task and creates the next task, but the task is not assigned to anyone. is there a workaround to assign the task after prior task has been completed?

                    • 7. Re: Transaction Problems jBPM5
                      vchmakov Newbie

                      This makes me think that the Actor ID of your second task is defined as a process variable. If this is true then how do you manage this variable, i.e. where this variable gets assigned? Is the required value a part of the first task output?

                       

                      Thanks,

                       

                      Vladimir

                      • 8. Re: Transaction Problems jBPM5
                        Shobhit Tyagi Master

                        No no. Its not a variable, I have hardcoded the actor id in the process definition itself.

                        See, I have deployed the human task server war in my websphere after making the datasource changes the persistence inside it.

                        Thats the only thing I changed. Even running the evaluation example creates a task but in CREATED state. thats what is weird. It should be in RESERVED state isnt it?

                        • 9. Re: Transaction Problems jBPM5
                          Maciej Swiderski Master

                          do you use UserGroupCallback? If so it could be that callback does remove users that it does not consider as valid. Best would be to debug it and see why potential owners are removed when task is created. Additionaly can you check (to cofirm) that there are no potential owners stored in db for that task?

                           

                          HTH

                          • 10. Re: Transaction Problems jBPM5
                            Shobhit Tyagi Master

                            I think so Maciej. To have the task service running. I deployed the human task war in websphere server after making a few changes to its persistence. And I believe by default the human task war uses UserGroupCallBack? But I am not sure. In that case how do I make sure that it does not remove the users.

                            The PEOPLEASSIGNMENTS_POTOWNERS show me nothing.

                            • 11. Re: Transaction Problems jBPM5
                              Shobhit Tyagi Master

                              Maciej,

                               

                              You are right. The UserCallBack was removing users because while moving human task war to another web container, I didnot take care of roles.properties. file.. So all the users were invalid for it. Thanks mate.