java - JBPM 6.2 Audit Log can't establish JTA Transaction -
when getting process instance variables audit log, following error:
caused by: java.lang.illegalstateexception: unable find jta transaction. @ org.jbpm.process.audit.strategy.standalonejtastrategy.jointransaction(standalonejtastrategy.java:45) [jbpm-audit.jar:6.2.0.final] @ org.jbpm.process.audit.jpaauditlogservice.jointransaction(jpaauditlogservice.java:370) [jbpm-audit.jar:6.2.0.final] @ org.jbpm.process.audit.jpaauditlogservice.executequery(jpaauditlogservice.java:378) [jbpm-audit.jar:6.2.0.final] @ org.jbpm.process.audit.jpaauditlogservice.findvariableinstances(jpaauditlogservice.java:275) [jbpm-audit.jar:6.2.0.final] @ za.co.symbiotics.jbpm.runtime.processmanager.getprocessinstancevariables(processmanager.java:53) [process-service-ejb.jar:]
any assistance appreciated. per previous question, have verified transaction-type="jta"
in persistence.xml
code snippet:
list<?> variablelist = processfactory.getauditservice().findvariableinstances(processinstanceid); public auditservice getauditservice() { runtimeengine runtime = runtimemanager.getruntimeengine(emptycontext.get()); return runtime.getauditservice(); } persistence.xml: <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="jta"> <provider>org.hibernate.jpa.hibernatepersistenceprovider</provider> <jta-data-source>java:jboss/datasources/jbpm-ds</jta-data-source> <mapping-file>meta-inf/jbpmorm.xml</mapping-file> <mapping-file>meta-inf/taskorm.xml</mapping-file> <mapping-file>meta-inf/taskauditorm.xml</mapping-file> <mapping-file>meta-inf/servicesorm.xml</mapping-file> <class>org.drools.persistence.info.sessioninfo</class> <class>org.drools.persistence.info.workiteminfo</class> <class>org.jbpm.persistence.processinstance.processinstanceinfo</class> <class>org.jbpm.persistence.correlation.correlationkeyinfo</class> <class>org.jbpm.persistence.correlation.correlationpropertyinfo</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.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.audittaskimpl</class> <class>org.jbpm.services.task.audit.impl.model.bamtasksummaryimpl</class> <class>org.jbpm.services.task.audit.impl.model.taskeventimpl</class> <class>org.jbpm.kie.services.impl.store.deploymentstoreentry</class> <exclude-unlisted-classes>true</exclude-unlisted-classes> <properties> <property name="hibernate.max_fetch_depth" value="3" /> <property name="hibernate.show_sql" value="false" /> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.jbosstransactionmanagerlookup" /> <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.jbossappserverjtaplatform" /> <property name="hibernate.dialect" value="org.hibernate.dialect.postgresqldialect" /> <property name="hibernate.id.new_generator_mappings" value="false" /> <property name="hibernate.hbm2ddl.auto" value="update" /> </properties> </persistence-unit>
wildfly 8.2.0 datasource definition:
<datasource jta="true" jndi-name="java:jboss/datasources/jbpm-ds" pool-name="bpm-ds" enabled="true" use-java-context="true" use-ccm="false"> <connection-url>jdbc:postgresql://localhost:5432/bpm</connection-url> <driver>postgresql</driver> <pool> <min-pool-size>2</min-pool-size> <max-pool-size>20</max-pool-size> </pool> <security> <user-name>userid</user-name> <password>password</password> </security> <validation> <validate-on-match>false</validate-on-match> <background-validation>false</background-validation> <background-validation-millis>1</background-validation-millis> </validation> <statement> <prepared-statement-cache-size>0</prepared-statement-cache-size> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource>
Comments
Post a Comment