cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Process engine is null

techy
Champ in-the-making
Champ in-the-making
When I run my java web application on eclipse luna, I'm having a null pointer on process engine. My activiti.cfg.xml file in my classpath. Note that the same project when I run it my eclipseforspring,it works fine. I'm having this issue only in eclipse.
   

public static List<Task> getTaskList() {
   
      ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
      
      TaskService taskService = processEngine.getTaskService();
      try {
         taskList= taskService.createTaskQuery().taskCandidateUser(username).list();
         return taskList;
      } catch(NullPointerException e){
         return null;
      }
   }

and in my activiti.cfg.xml, I have this line:
<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">


Did I miss a jar file?I check it in both ide and it's the same.
4 REPLIES 4

techy
Champ in-the-making
Champ in-the-making
I have this line:

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

sorry i miss this line in the post

jbarrez
Star Contributor
Star Contributor
That should be id. Are you sure the activiti.cfg.xml file is on your classpath (eg using maven in the src/main/resources)?

techy
Champ in-the-making
Champ in-the-making
Yes it is on the classpath. The same project run on myeclipseforspring. I just move the project to eclipse and it's not working now.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Check your classpath settings in eclipse.

Martin