cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.NoClassDefFoundError: org.activiti.spring.SpringProcessEngineConfiguration

madhunatarajan
Champ in-the-making
Champ in-the-making
I am trying to run the activity in websphere, which is working in jboss.
     <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="deploymentResources" value="classpath*:ehrActiviti.bpmn20.xml" />
     <property name="deploymentResources" value="classpath*:CorrespondenceGeneratorProcess.bpmn20.xml" />  –>
      <property name="createDiagramOnDeploy" value="true" />
      <property name="databaseType" value="oracle" />
      <property name="dataSource" ref="dataSource" />
      <property name="transactionManager" ref="transactionManager" />
      <property name="databaseSchemaUpdate" value="true" />
      <property name="jobExecutorActivate" value="false" />
     </bean>

When I tried to deploy in websphere, I get the following error,

    Caused by: org.springframework.beans.factory.access.BootstrapException: Unable to initialize group definition. Group resource name [classpath*:beanRefContext.xml], factory key [beanFactory]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'beanFactory' defined in URL [wsjar:file:/D:/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/MohanPW764Node01Cell/eCAMS.ear/ecams.jar!/beanRefContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.FileSystemXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngineConfiguration' defined in class path resource [springActivitiContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org.activiti.spring.SpringProcessEngineConfiguration (initialization failure)
   at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:386)

I tried adding the jar files in the D:\IBM\Websphere\lib\,
activation 1.1 jar, mybatis-3.1.1.jar, activiti-spring-5.12.1.jar, activiti-engine-5.12.1.jar and also have added these files in the web-inf-lib file.

I am having an urgent requirement to finish this.

Can anybody please guide me?.

Thanks
6 REPLIES 6

madhunatarajan
Champ in-the-making
Champ in-the-making
I am new to this. So, let me know if anybody has some suggestion

trademak
Star Contributor
Star Contributor
Please ask a question only once and this question should actually be posted on the user forum.
The exception says it all, it's not able to find the SpringProcessEngineConfiguration class, which is part of the activiti-spring JAR. So it looks like the classloading isn't working as expected in your WebSphere.

Best regards,

madhunatarajan
Champ in-the-making
Champ in-the-making
I have added the jar files already there, which i have mentioned in the jar list. Please note that. Even then it was not working. That's the reason i posted this query. I wanted to know where i need to place the jar file. Can you guide me on this?

frederikherema1
Star Contributor
Star Contributor
Use maven and include ALL dependencies activiti-engine and activiti-spring has. The noclassdef indicates a dependant class of the activiti-spring class is missing…

Thanks for your comment. I added the following files in the same path in the lib folder of websphere, commons-email-1.2 jar, mail-1.4.1.jar, common-langs-2.4.jar, commons-logging-1.1.1.jar, joda-time-2.1.jar, slf4j-api-1.7.2.jar, jcl-over-slf4j-1.7.2.jar, aopalliance-1.0.jar, commons-dbcp-1.4.jar, commons-pool-1.5.4.jar.

Now it is working. Smiley Happy

But can you please state why do I need these many jars to make the activity run?.

frederikherema1
Star Contributor
Star Contributor
- The commons-email is only needed if you use the email-task. (mail + commons-mail)
- Commons lang is a real small util-lib.
- SLF4J is a very common logging library. We need the JCL-over-sfl4j to make other liberaries we use, log over slf4j even though they don't know it. These are required and were probabily the culprit on this issue.
- The dbcp and commons-pool is only required if you delare a connection-pool using DBCP. If you're using another pool, you can remove those.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.