cancel
Showing results for 
Search instead for 
Did you mean: 

Spring Configuration in 5.17

dactiviti
Champ in-the-making
Champ in-the-making
Hi, i am upgrading from 5.15.1 to 5.17 and i am getting the exception below when i call ProcessEngines.init(). I looked at the SpringConfigurationHelper.buildProcessEngine method and it was changed from public to private in 5.17. It looks like nothing has changed from a Spring configuration perspective in the new version according to the User Guide. Was the method visibility change a mistake or is there a new way to configure using spring?

Exception during lifecycle processing
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.activiti.engine.ActivitiException: couldn't initialize process engine from spring configuration resource file:/usr/local/glassfish4/glassfish/domains/domain1/applications/domain-workflow/WEB-INF/classes/activiti-context.xml: org.activiti.spring.SpringConfigurationHelper.buildProcessEngine(java.net.URL)


Here is part of my activiti-context.xml file:

  <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="jdbc/WorkflowDataSource" />
  </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="true" />
   
    <property name="deploymentResources">
      <list>
        <value>classpath*:/diagrams/*.bpmn</value>
      </list>
    </property>   
  </bean>

  <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
    <property name="processEngineConfiguration" ref="processEngineConfiguration" />
  </bean>
1 REPLY 1

dactiviti
Champ in-the-making
Champ in-the-making
i am not sure why it cut out what i pasted in for my activiti-context.xml file… but here it is again.

  <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    <property name="jndiName" value="jdbc/WorkflowDataSource" />
  </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="true" />

    <property name="deploymentResources">
      <list>
        <value>classpath*:/diagrams/*.bpmn</value>
      </list>
    </property>   
  </bean>
 
  <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
    <property name="processEngineConfiguration" ref="processEngineConfiguration" />
  </bean>