我正在使用 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 的最终版本。
有人可以帮我指出正确的方向吗?
非常感谢,马扬克