0

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/workflows and using jbpm library version of 5.5.0.Final of jbpm-human-task-core, jbpm-bpmn2, jbpm-persistence-jpa.

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

Many thanks, Mayank

Mayank
  • 41
  • 2
  • 11

1 Answers1

0

There's an issue during rollback of the transaction. However, the rollback itself is caused by another issue (possibly an issue related to starting the transaction). However, that exception is not showing here. Is there any exception logged before this one? If not, could you try debugging the SingleSessionCommandService.rollbackTransaction operation, so you can see which exception is triggering the rollback?

Some help on which version exactly you are using would be helpful, as for example in the latest version the cause of the rollback should be logged already: https://github.com/droolsjbpm/drools/blob/master/drools-persistence-jpa/src/main/java/org/drools/persistence/SingleSessionCommandService.java#L364

Kris Verlaenen
  • 2,918
  • 1
  • 15
  • 5
  • 1
    Hi @Kris, I am using all the libraries which are related to jBPM5 (*.5.5.0.Final.jar). I have goggled a bit and found there is some bug exists in jBPM 5.2 library. Posting the [link](https://issues.jboss.org/browse/JBPM-3934). Not sure whether it got fixed in version of 5.5.0 final release or not. – Mayank Feb 03 '15 at 13:28