AnsweredAssumed Answered

Error checking for a transaction

Question asked by andremonteiro on Sep 12, 2013
Latest reply on Sep 17, 2013 by andremonteiro

I'm using activit-cdi with Jboss AS 7 and facing the following issue:

1) I have a Listner in a flow process of type Expression, that calls a application's class method (let's say, myMethod), to validate some data;

2) When the user clicks into "Save" button of type submit into a xhml page, the listner is called;

3) If the validate fails, myMethod throws a business Exception, that should be intercepted by my interceptor, that shows a message to the user;

4) However, when the exception is launched, I'm suspecting that the Activiti class catch this exception, and then closes the transaction;

5) Then, when the page is reloaded, the xhtml tries to get some information by Activiti (using the RuntimeService class), but the transaction is no longer avaliable, which results into the following stacktrace:

javax.servlet.ServletException: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000460: Error checking for a transaction
### The error may exist in org/activiti/db/mapping/entity/Execution.xml
### The error may involve org.activiti.engine.impl.persistence.entity.ExecutionEntity.selectExecution
### The error occurred while executing a query
### Cause: java.sql.SQLException: javax.resource.ResourceException: IJ000460: Error checking for a transaction

My activiti.cgf.xml is configured as follow:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""
   <!– lookup the JTA-Transaction manager –>
   <bean id="transactionManager" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiName" value="java:jboss/TransactionManager"></property>
        <property name="resourceRef" value="true" />

    <bean id="processEngineConfiguration" class="org.activiti.cdi.CdiJtaProcessEngineConfiguration">
        <!– lookup the default Jboss datasource –>
        <property name="dataSourceJndiName" value="java:/bpm-activiti" />
        <property name="transactionManager" ref="transactionManager" />
        <!– using externally managed transactions –>
        <property name="transactionsExternallyManaged" value="true" />
        <property name="databaseSchemaUpdate" value="true" />
        <property name="databaseType" value="oracle" />
        <property name="jobExecutorActivate" value="true" />
        <property name="history" value="audit" />             
        <property name="customFormTypes">

Can anyone help me? Thanks in advance.