cancel
Showing results for 
Search instead for 
Did you mean: 

transactionManager is required property for SpringProcessEng

yinhongzhan
Champ in-the-making
Champ in-the-making
Hello I am from China. So my english is bad . Please contains.

I had a problem.
I user spring3.0.6 and activiti5.6. When integration them that a problem appear.
Mistakes as follows:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: transactionManager is required property for SpringProcessEngineConfiguration, use org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration otherwise
   at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
   at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1440)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:304)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
   at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:353)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:983)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:879)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByName(AbstractAutowireCapableBeanFactory.java:1104)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1054)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
   … 26 more
Caused by: org.activiti.engine.ActivitiException: transactionManager is required property for SpringProcessEngineConfiguration, use org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration otherwise
   at org.activiti.spring.SpringProcessEngineConfiguration.getDefaultCommandInterceptorsTxRequired(SpringProcessEngineConfiguration.java:68)
   at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initCommandInterceptorsTxRequired(ProcessEngineConfigurationImpl.java:332)
   at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initCommandExecutors(ProcessEngineConfigurationImpl.java:318)
   at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:297)
   at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:279)
   at org.activiti.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:61)
   at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:56)
   at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)
   at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)

My config as follows:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
      <property name="driverClassName" value="${connection.driver_class_mysql}" />
      <property name="url" value="${jdbc.connection.url}" />
      <property name="username" value="${jdbc.connection.username}" />
      <property name="password" value="${jdbc.connection.password}" />
      
      <!– Connection Pooling Info –>
      <property name="maxIdle" value="${jdbc.dbcp.maxIdle}" />
      <property name="minIdle" value="${jdbc.dbcp.minIdle}" />
      <property name="maxActive" value="${jdbc.dbcp.maxActive}" />
      <property name="defaultAutoCommit" value="${jdbc.dbcp.defaultAutoCommit}" />
      <property name="defaultReadOnly" value="${jdbc.dbcp.defaultReadOnly}" />
      <property name="timeBetweenEvictionRunsMillis" value="${jdbc.dbcp.timeBetweenEvictionRunsMillis}" />
      <property name="minEvictableIdleTimeMillis" value="${jdbc.dbcp.minEvictableIdleTimeMillis}" />
   
      <property name="logAbandoned" value="${jdbc.dbcp.logAbandoned}" />
      <property name="removeAbandoned" value="${jdbc.dbcp.removeAbandoned}" />
      <property name="removeAbandonedTimeout" value="${jdbc.dbcp.removeAbandonedTimeout}" />
      <property name="maxWait" value="${jdbc.dbcp.maxWait}" />
   </bean>

<bean id="activitiTransactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
      <property name="dataSource" ref="dataSource" />
   </bean>
   
   <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
      <property name="transactionManager" ref="activitiTransactionManager" />   
      <property name="dataSource" ref="dataSource" />
   </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" />
   
   <tx:annotation-driven transaction-manager="activitiTransactionManager" />

I can not understand that the transactionManager is  injected ,but the error is say 'the transactionManager is required.'

who can help me , thanks !!
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi,

Is there a specific reason why your are still using version 5.6? I would advise to upgrade to 5.8.
Can you change the name of the activitiTransactionManager bean to transactionManager?
If that doesn't work, please post a full Spring configuration file so I can reproduce the error.

Best regards,