cancel
Showing results for 
Search instead for 
Did you mean: 

Error while migration from Activiti-engine 5.9 to 5.18.0

nal_raj
Champ on-the-rise
Champ on-the-rise
  HI I am getting following error while migrating from Activiti-Engine 5.9 to  Activiti-Engine 5.18.0 ERROR  [org.activiti.engine.impl.db.DbSqlSession] (ServerService Thread Pool – 62) problem during schema upgrade, statement alter table ACT_RU_IDENTITYLINK
add PROC_DEF_ID_ NVARCHAR2(64): java.sql.SQLSyntaxErrorException: ORA-02089: COMMIT is not allowed in a subordinate session

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
        at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)
        at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1000)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
        at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1882)
        at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1847)
        at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:301)
        at org.jboss.jca.adapters.jdbc.WrappedStatement.execute(WrappedStatement.java:157)
        at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:1362) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:1282) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpgrade(DbSqlSession.java:1261) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:1118) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1473) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:49) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:77) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:427) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:60) [activiti-spring-5.18.0.jar:5.18.0]
        at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32) [activiti-spring-5.18.0.jar:5.18.0]
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1442) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:353) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) [spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) [spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) [spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93) [spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
      
==========================================================================
<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.JtaProcessEngineConfiguration">
    <property name="dataSource" ref="dataSourceUT" />   
    <property name="jpaEntityManagerFactory" ref="entityManagerFactory" />
    <property name="transactionManager" ref="transactionManager"/>
    <property name="jpaHandleTransaction" value="false" />
    <property name="transactionsExternallyManaged" value="true" />
    <property name="jpaCloseEntityManager" value="false" /> 
    <property name="databaseSchemaUpdate" value="true" />
    <property name="jobExecutorActivate" value="false" />
   <property name="history" value="none" />
  </bean>
8 REPLIES 8

jbarrez
Star Contributor
Star Contributor
That error does not ring any bell ("COMMIT is not allowed in a subordinate session"). Does the same happen when you manually apply the sql script?

nal_raj
Champ on-the-rise
Champ on-the-rise
Thanks for reply…You are right ..we have resolved this error by manually applying sql script.
We are upgrading to V 5.18.0 mainly for performance improvement..Could you please tell us the things needs to apply while migrating from 5.9 to 5.18.0. respective to performance improvement.

Thank you Smiley Happy

jbarrez
Star Contributor
Star Contributor
That's a very broad question … in general 5.18 should be better because we've spent more time on it.
I can't think of any particular performance change you'd have to do. As always, with Activiti database and connection pool settings are the most important tweaks.

nal_raj
Champ on-the-rise
Champ on-the-rise
Smiley Happy
Yup Thanks…we are trying with possible indexing on db side..will try with connections pool settings as well.
another thing is, In one of our process definition XML (bpmn20.xml) file we have default condition as follow

exclusiveGateway id="exclusivegateway_unreleased" name="Exclusive Gateway Unreleased" default="flow_to_unreleaased_back"></exclusiveGateway

THis (default="flow_to_unreleaased_back) condition working fine with 5.9 but not with 5.18.0, Its working fine by removing this default condition.
But as per our business rules we can't remove this default condition.
Could you please tell us , how to proceed with this default condition?

Error Stack:-
2015:10:07 12:07:40,163 ERROR  [org.jboss.as.ejb3] (ServerService Thread Pool – 73) javax.ejb.EJBTransactionRolledbackException: Error creating bean with name 'deployer' defined in class path resource [activiti.cfg.xml]: Invocation of init method failed; nested exception is org.activiti.engine.ActivitiException: Errors while parsing:
[Validation set: 'activiti-executable-process' | Problem: 'activiti-exclusive-gateway-condition-on-seq-flow'] : Default sequenceflow has a condition, which is not allowed - [Extra info : processDefinitionId = OrderFlow | processDefinitionName = OrderFlow |  | id = exclusivegateway_unreleased |  | activityName = Exclusive Gateway Unreleased | ] ( line: 24, column: 5)

jbarrez
Star Contributor
Star Contributor
Hmm that's indeed a validation rule that probably was added > 5.9.

One 'workaround' could be to disable the validator:
<code>
Iterator<Validator> it = processEngineConfiguration.getProcessValidator().getValidatorSets().get(0).getValidators().iterator();
while (it.hasNext()) {
  Validator validator = it.next();
  if (validator instanceof ExclusiveGatewayValidator) {
    it.remove();
  }
}
</code>

Note that this will completely remove the validator. You might want to add a customize version of the ExclusiveGatwewayValidator that does the other validations for the exclusive gateway.

nal_raj
Champ on-the-rise
Champ on-the-rise
Hi I am getting new error at as follows
Configuration:- Activiti 5.18.0 with Spring 3.1.1.RELEASE
Even i have custom tasklistner implements TaskListener interface.

Caused by: org.activiti.engine.ActivitiException: Exception while invoking TaskListener: null
        at org.activiti.engine.impl.bpmn.helper.ClassDelegate.notify(ClassDelegate.java:119) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:34) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25) [activiti-engine-5.18.0.jar:5.18.0]
        at org.activiti.engine.impl.persistence.entity.TaskEntity.fireEvent(TaskEntity.java:728) [activiti-engine-5.18.0.jar:5.18.0]
        … 265 more

========================
<blockcode>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jee="http://www.springframework.org/schema/jee"
       xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd
                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
                           http://www.springframework.org/schema/tx      http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">

  <jee:jndi-lookup id="dataSourceUT" jndi-name="java:jboss/datasources/VirtuosoDatasource" />
  <jee:jndi-lookup id="entityManagerFactory" jndi-name="java:jboss/emf/virtuosoEntityManagerFactory" />
  <jee:jndi-lookup id="transactionManager" jndi-name="java:jboss/TransactionManager"/>
 
  <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.JtaProcessEngineConfiguration">
    <property name="dataSource" ref="dataSourceUT" />   
    <property name="jpaEntityManagerFactory" ref="entityManagerFactory" />
    <property name="transactionManager" ref="transactionManager"/>
    <property name="jpaHandleTransaction" value="false" />
    <property name="transactionsExternallyManaged" value="true" />
    <property name="jpaCloseEntityManager" value="false" /> 
    <property name="databaseSchemaUpdate" value="true" />
    <property name="jobExecutorActivate" value="false" />
    <property name="asyncExecutorEnabled" value="true" />
    <property name="asyncExecutorActivate" value="true" />
<property name="history" value="none" />
  </bean>
 
  <bean id="processEngine"  class="org.activiti.spring.ProcessEngineFactoryBean">
    <property name="processEngineConfiguration" ref="processEngineConfiguration" />
  </bean>
 
  <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
  <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
  <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
  <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
  <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
 
 
 
<bean id="processHelper"
  class="com.bioimagene.virtuoso.workflow.framework.ProcessHelper">
  <property name="processEngine">
   <ref bean="processEngine" />
  </property>
  <property name="runtimeService">
   <ref bean="runtimeService" />
  </property>
  <property name="taskService">
   <ref bean="taskService" />
  </property>
  <property name="repositoryService">
   <ref bean="repositoryService" />
  </property>
</bean>

<bean id="deployer" class="com.bioimagene.virtuoso.DeployWorkflow"
  init-method="init" >
  <property name="helper">
   <ref bean="processHelper" />
  </property>
  <property name="processFiles">
   <list>
    <value>OrderFlow.bpmn20.xml</value>
        
   </list>
  </property>
</bean> 
</beans>
</blockcode>



trademak
Star Contributor
Star Contributor
Is there a specific reason for using version 3.1.1 of Spring? That's a really old version.
Can you share the BPMN XML of the process definition that is failing? Do you know in which state of the process this exception is thrown?

Best regards,

nal_raj
Champ on-the-rise
Champ on-the-rise
Actually all product is in 3.1.1 version…now its very tough to upgrade spring version.
PFA BPMN XML…in State of "Sign-Out" state its failing. as this handle through callback with process.