jbpm 审计日志总是在寻找 jta 事务
jbpm audit log always looking for jta transaction
我正在尝试从 JBPM AuditLog 中提取记录,但我得到了
SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/dms] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Unable to find JTA transaction.] with root cause
java.lang.IllegalStateException: Unable to find JTA transaction.
at org.jbpm.process.audit.strategy.StandaloneJtaStrategy.joinTransaction(StandaloneJtaStrategy.java:45)
at org.jbpm.process.audit.JPAAuditLogService.joinTransaction(JPAAuditLogService.java:319)
at org.jbpm.process.audit.JPAAuditLogService.executeQuery(JPAAuditLogService.java:327)
at org.jbpm.process.audit.JPAAuditLogService.findVariableInstancesByNameAndValue(JPAAuditLogService.java:280)
at com.softech.dms.workflow.WorkflowUtil.getAuditLog(WorkflowUtil.java:237)
at com.softech.dms.workflow.WorkflowUtil$$FastClassBySpringCGLIB$d95f1.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
看trace还是用JTA策略而不是本地事务策略
我正在使用 jbpm v6.2.0.CR2 我的 persistence.xml 如下
<persistence-unit name="dms-jbpm" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<mapping-file>META-INF/JBPMorm.xml</mapping-file>
<mapping-file>META-INF/Taskorm.xml</mapping-file>
<mapping-file>META-INF/TaskAuditorm.xml</mapping-file>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<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.correlation.CorrelationKeyInfo</class>
<class>org.jbpm.persistence.correlation.CorrelationPropertyInfo</class>
<class>org.jbpm.runtime.manager.impl.jpa.ContextMappingInfo</class>
<class>org.jbpm.services.task.impl.model.AttachmentImpl</class>
<class>org.jbpm.services.task.impl.model.ContentImpl</class>
<class>org.jbpm.services.task.impl.model.BooleanExpressionImpl</class>
<class>org.jbpm.services.task.impl.model.CommentImpl</class>
<class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
<class>org.jbpm.services.task.impl.model.DelegationImpl</class>
<class>org.jbpm.services.task.impl.model.EscalationImpl</class>
<class>org.jbpm.services.task.impl.model.GroupImpl</class>
<class>org.jbpm.services.task.impl.model.I18NTextImpl</class>
<class>org.jbpm.services.task.impl.model.NotificationImpl</class>
<class>org.jbpm.services.task.impl.model.EmailNotificationImpl</class>
<class>org.jbpm.services.task.impl.model.EmailNotificationHeaderImpl</class>
<class>org.jbpm.services.task.impl.model.PeopleAssignmentsImpl</class>
<class>org.jbpm.services.task.impl.model.ReassignmentImpl</class>
<class>org.jbpm.services.task.impl.model.TaskImpl</class>
<class>org.jbpm.services.task.impl.model.TaskDataImpl</class>
<class>org.jbpm.services.task.impl.model.UserImpl</class>
<class>org.jbpm.services.task.audit.impl.model.BAMTaskSummaryImpl</class>
<class>org.jbpm.services.task.audit.impl.model.TaskEventImpl</class>
<class>org.jbpm.services.task.audit.impl.model.AuditTaskImpl</class>
<properties>
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.BitronixJtaPlatform" />
</properties>
</persistence-unit>
jBPM 持久性使用 JTA 来管理事务。因此,您应该在 persistence.xml 中使用 JTA 作为事务类型并使用 JTA 数据源。唯一的例外是 Spring,我们还与 Spring 事务管理器集成以支持本地事务。
我正在尝试从 JBPM AuditLog 中提取记录,但我得到了
SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/dms] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Unable to find JTA transaction.] with root cause
java.lang.IllegalStateException: Unable to find JTA transaction.
at org.jbpm.process.audit.strategy.StandaloneJtaStrategy.joinTransaction(StandaloneJtaStrategy.java:45)
at org.jbpm.process.audit.JPAAuditLogService.joinTransaction(JPAAuditLogService.java:319)
at org.jbpm.process.audit.JPAAuditLogService.executeQuery(JPAAuditLogService.java:327)
at org.jbpm.process.audit.JPAAuditLogService.findVariableInstancesByNameAndValue(JPAAuditLogService.java:280)
at com.softech.dms.workflow.WorkflowUtil.getAuditLog(WorkflowUtil.java:237)
at com.softech.dms.workflow.WorkflowUtil$$FastClassBySpringCGLIB$d95f1.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
看trace还是用JTA策略而不是本地事务策略
我正在使用 jbpm v6.2.0.CR2 我的 persistence.xml 如下
<persistence-unit name="dms-jbpm" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<mapping-file>META-INF/JBPMorm.xml</mapping-file>
<mapping-file>META-INF/Taskorm.xml</mapping-file>
<mapping-file>META-INF/TaskAuditorm.xml</mapping-file>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<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.correlation.CorrelationKeyInfo</class>
<class>org.jbpm.persistence.correlation.CorrelationPropertyInfo</class>
<class>org.jbpm.runtime.manager.impl.jpa.ContextMappingInfo</class>
<class>org.jbpm.services.task.impl.model.AttachmentImpl</class>
<class>org.jbpm.services.task.impl.model.ContentImpl</class>
<class>org.jbpm.services.task.impl.model.BooleanExpressionImpl</class>
<class>org.jbpm.services.task.impl.model.CommentImpl</class>
<class>org.jbpm.services.task.impl.model.DeadlineImpl</class>
<class>org.jbpm.services.task.impl.model.DelegationImpl</class>
<class>org.jbpm.services.task.impl.model.EscalationImpl</class>
<class>org.jbpm.services.task.impl.model.GroupImpl</class>
<class>org.jbpm.services.task.impl.model.I18NTextImpl</class>
<class>org.jbpm.services.task.impl.model.NotificationImpl</class>
<class>org.jbpm.services.task.impl.model.EmailNotificationImpl</class>
<class>org.jbpm.services.task.impl.model.EmailNotificationHeaderImpl</class>
<class>org.jbpm.services.task.impl.model.PeopleAssignmentsImpl</class>
<class>org.jbpm.services.task.impl.model.ReassignmentImpl</class>
<class>org.jbpm.services.task.impl.model.TaskImpl</class>
<class>org.jbpm.services.task.impl.model.TaskDataImpl</class>
<class>org.jbpm.services.task.impl.model.UserImpl</class>
<class>org.jbpm.services.task.audit.impl.model.BAMTaskSummaryImpl</class>
<class>org.jbpm.services.task.audit.impl.model.TaskEventImpl</class>
<class>org.jbpm.services.task.audit.impl.model.AuditTaskImpl</class>
<properties>
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.BitronixJtaPlatform" />
</properties>
</persistence-unit>
jBPM 持久性使用 JTA 来管理事务。因此,您应该在 persistence.xml 中使用 JTA 作为事务类型并使用 JTA 数据源。唯一的例外是 Spring,我们还与 Spring 事务管理器集成以支持本地事务。