AnsweredAssumed Answered

Schema creation with JTA and Oracle database

Question asked by wismax on Sep 7, 2011
Latest reply on Sep 8, 2011 by heymjo

We are facing an issue during schema creation at the first Activiti startup. We are using Activiti inside a Spring application using an embedded Jencks/Geronimo JTA transaction manager which connect to an Oracle 11g database instance.

During schema creation, we have the following exception thrown by Activiti:

2011-09-07 16:56:18,676 [           main] ERROR [                            o.a.e.i.d.DbSqlSession] problem during schema create, statement 'create table ACT_GE_PROPERTY (
primary key (NAME_)
java.sql.SQLSyntaxErrorException: ORA-02089: COMMIT is not allowed in a subordinate session

   at oracle.jdbc.driver.T4CTTIoer.processError(
   at oracle.jdbc.driver.T4CTTIoer.processError(
   at oracle.jdbc.driver.T4C8Oall.processError(
   at oracle.jdbc.driver.T4CTTIfun.receive(
   at oracle.jdbc.driver.T4CTTIfun.doRPC(
   at oracle.jdbc.driver.T4C8Oall.doOALL(
   at oracle.jdbc.driver.T4CStatement.doOall8(
   at oracle.jdbc.driver.T4CStatement.executeForRows(
   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
   at oracle.jdbc.driver.OracleStatement.executeInternal(
   at oracle.jdbc.driver.OracleStatement.execute(
   at oracle.jdbc.driver.OracleStatementWrapper.execute(
   at org.tranql.connector.jdbc.StatementHandle.execute(
   at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(

What happens is the following:
  • we have configured activiti to use the jta transaction using this spring bean
        <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
            <property name="databaseType" value="${activiti.datasource.databasetype}" />
            <property name="dataSource" ref="dataSource" />
            <property name="transactionManager" ref="transactionManager" />
            <property name="transactionsExternallyManaged" value="true"/>
            <property name="databaseSchemaUpdate" value="true" />
            <property name="jobExecutorActivate" value="false" />

  • at startup activiti wants to create the schema

  • a new JTA transaction is started

  • the DDL statements are always executed in autocommit by Oracle

  • so the exception is thrown
My question is: is there a way to tell activity to not participate in JTA transaction for the schema creation/update part ?

Thx for your help !