0

我正在使用 jBPM5,并且我已经将 Bitronix 事务管理器 (BTM) 配置为 jBPM 流程持久性单元使用的事务管理器。

过去两周一切正常,但突然开始失败,出现以下异常,导致我重新启动应用程序服务器。重新启动后,一切都按预期正常工作。

异常堆栈跟踪:

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

我们正在启动大量事务/工作流,并使用 5.5.0 的 jbpm 库版本。jbpm-human-task-core、jbpm-bpmn2、jbpm-persistence-jpa 的最终版本。

有人可以帮我指出正确的方向吗?

非常感谢,马扬克

4

1 回答 1

0

事务回滚期间出现问题。但是,回滚本身是由另一个问题引起的(可能是与启动事务有关的问题)。但是,这里没有显示该异常。在此之前是否记录了任何异常?如果没有,您能否尝试调试 SingleSessionCommandService.rollbackTransaction 操作,以便查看是哪个异常触发了回滚?

关于您正在使用的版本的一些帮助会有所帮助,例如在最新版本中,应该已经记录回滚的原因: https ://github.com/droolsjbpm/drools/blob/master/drools-persistence- jpa/src/main/java/org/drools/persistence/SingleSessionCommandService.java#L364

于 2014-12-01T13:05:15.550 回答