2 Replies Latest reply on Nov 6, 2014 5:55 AM by Myank Jain

    Drools persistence unable to rollback

    Myank Jain Newbie

      Hello everyone,

       

      I am using jBPM5 and along with I have configured Bitronix Transaction Manager (BTM) as transaction manager to be used by jBPM process persistence unit.

       

      Everything works fine from past two weeks but suddenly it started failing with following exception, which results me in restarting of application server. After restarts everything works normal as expected.

       

      Exception Stacktrace:

      com.xxx.jbpm.workflow.exception.WorkflowException: Could not commit session or rollback

        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)

        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)

        at com.xxx.platform.eventpublisher.xxxEventPublisher.publish(xxxEventPublisher.java:16)

        at com.xxx.xxx.wsserver.impl.dlp.DLPCheckTask.publish(DLPCheckTask.java:97)

        at com.xxx.xxx.wsserver.impl.dlp.DLPCheckTask.run(DLPCheckTask.java:56)

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

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

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

      Caused by: java.lang.RuntimeException: Could not commit session or rollback

        at org.drools.persistence.SingleSessionCommandService.rollbackTransaction(SingleSessionCommandService.java:406)

        at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:381)

        at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcessInstance(CommandBasedStatefulKnowledgeSession.java:237)

        at com.xxx.jbpm.workflow.services.WorkflowServiceHandler.startWorkflow(WorkflowServiceHandler.java:71)

        at com.xxx.jbpm.workflow.impl.WorkflowManagerImpl.startWorkflow(WorkflowManagerImpl.java:46)

        ... 12 more

      Caused by: 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)

        ... 16 more

      Caused by: java.lang.IllegalStateException: no transaction started on this thread

        at bitronix.tm.BitronixTransactionManager.rollback(BitronixTransactionManager.java:150)

        at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:191)

        ... 17 more

       

      We are initiating a good amount of transaction/workflow and using jbpm library version of 5.5.0.Final for jbpm-human-task-core, jbpm-bpmn2, jbpm-persistence-jpa components.


      Could anybody please help me out to point into the right direction?

       

      Many thanks,

      Mayank