AnsweredAssumed Answered

Bean creation fails on mysql configuration

Question asked by marko on Jun 5, 2013
Latest reply on Jun 10, 2013 by frederikheremans1
Hey everybody,

I'm trying to use a mysql-database for Activiti BMPN.
For the Configurations I refer to the Activiti Guide.


<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />

</bean>


<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
            <property name="driverClassName" value="com.mysql.jdbc.Driver" />
            <property name="url" value="jdbc:mysql://localhost:3306/activiti" />
            <property name="username" value="root" />
            <property name="password" value="root" />
            <property name="defaultAutoCommit" value="false" />
        </bean>

   <bean id="processEngineConfiguration"
      class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">

      <property name="dataSource" ref="dataSource" />
      <property name="transactionManager" ref="transactionManager" />
      <property name="databaseSchemaUpdate" value="true" />
      <property name="jobExecutorActivate" value="true" />
   </bean>


The corresponding jar-files are located in: /WebContent/WEB-INF/lib/…
(Commons-dbcp-1.4.jar)

If I try to compile my project, I will get some error messages.


13:40:46,696 SEVERE [org.activiti.engine.ProcessEngines] (MSC service thread 1-3) Exception while initializing process engine :Error creating bean with name 'processEngineConfiguration' defined in resource loaded through InputStream: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in resource loaded through InputStream: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/ObjectPool: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngineConfiguration' defined in resource loaded through InputStream: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in resource loaded through InputStream: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/ObjectPool


Can you help me?

Outcomes