AnsweredAssumed Answered

ClassNotFoundException SpringConfigurationHelper

Question asked by franklin on Jul 7, 2011
Latest reply on Jul 15, 2011 by franklin
Hi all,

I'm new in Activiti and I'm facing a problem with Spring configuration. I try to configure my activiti-context.xml like this:

<?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"
   xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
                           http://www.springframework.org/schema/tx      http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

   <bean id="dataSource"
      class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
      <property name="driverClass" value="oracle.jdbc.OracleDriver" />
      <property name="url" value="jdbc:oracle:thin:@192.168.0.10:1521:arterh" />
      <property name="username" value="gpa" />
      <property name="password" value="gpa123!" />
   </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="beans">
         <map>
            <entry key="testeServiceTaskScript" value-ref="testeServiceTaskScript" />
         </map>
      </property>
      <property name="dataSource" ref="dataSource" />
      <property name="transactionManager" ref="transactionManager" />
      <property name="databaseSchemaUpdate" value="true" />
      <property name="jobExecutorActivate" value="false" />
   </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="testeServiceTaskScript" class="br.com.arteinfo.server.TesteServiceTaskScript" />

</beans>

But when I start the server ( Tomcat 6 ) I recieve this error message

org.activiti.engine.ActivitiException: couldn't initialize process engine from spring configuration resource file:/C:/franklin/activiti_install/activiti-5.3/apps/apache-tomcat-6.0.32/webapps/arteweb/WEB-INF/classes/activiti-context.xml: Class not found: org.activiti.spring.SpringConfigurationHelper
   at org.activiti.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:113)
   at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:98)
   at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:207)
   at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:200)
   at br.com.arteinfo.server.bpm.ActivitiManager.<init>(ActivitiManager.java:120)
   at br.com.arteinfo.server.bpm.ActivitiManager.instance(ActivitiManager.java:109)
   at br.com.arteinfo.server.infra.webcontainer.ApplicationListener.inicializaActiviti(ApplicationListener.java:180)
   at br.com.arteinfo.server.infra.webcontainer.ApplicationListener.contextInitialized(ApplicationListener.java:89)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
   at org.apache.catalina.core.StandardService.start(StandardService.java:525)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.activiti.engine.ActivitiClassLoadingException: Class not found: org.activiti.spring.SpringConfigurationHelper
   at org.activiti.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:81)
   at org.activiti.engine.ProcessEngines.initProcessEngineFromSpringResource(ProcessEngines.java:109)
   … 22 more
Caused by: java.lang.ClassNotFoundException: org.activiti.spring.SpringConfigurationHelper
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at org.activiti.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:62)
   … 23 more

I know that this error means that it couldnt find the class SpringConfigurationHelper. But my question is:
Where is this class? I try to find this jar but I have no sucess.

I'm working with Activiti 5.1 and Spring 3.0.3

Thank you all.

Outcomes