AnsweredAssumed Answered

Transaction RollbackException with Activiti/WebSphere/Spring

Question asked by bwestrich on Nov 2, 2011
Latest reply on Nov 2, 2011 by bwestrich
Hello Activiti gurus,

I'm attempting to embed Activiti (5.8) into a WebSphere (7.x) application using Spring (3.0.4), but am getting a javax.transaction.RollbackException.

Here's my Spring config:

<tx:annotation-driven />
<tx:jta-transaction-manager />
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="resourceRef" value="true" />
<property name="jndiName" value="jdbc/myDsName" />
</bean>
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="false" />
</bean>
<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>

The error happens inside a message driven EJB when RuntimeServiceImpl.startProcessInstanceByKey is called. Here’s the stack trace:

org.springframework.transaction.TransactionSystemException: UOWManager transaction processing failed; nested exception is com.ibm.wsspi.uow.UOWException: javax.transaction.RollbackException
       at org.springframework.transaction.jta.WebSphereUowTransactionManager.execute(WebSphereUowTransactionManager.java:288)
       at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:124)
       at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
       at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
       at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:41)
       at org.mypackage.Activiti.startProcessInstance(Activiti.java:390)
       at org.mypackage.ActivitiPayments.processEvent(ActivitiPayments.java:18)
       at org.mypackage.BpsmListenerServiceMessageHandler.doHandleMessage(BpsmListenerServiceMessageHandler.java:103)
       at org.mypackage.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:52)
       at org.mypackage.BpsmListenerService.onMessage(BpsmListenerService.java:41)

Any ideas how to resolve this?

Brian

Brian Westrich
bw@mcwest.com

Outcomes