Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-3546

Null pointer exception in org.jbpm.persistence.processinstance.JPAProcessInstanceManager when no process instances are loaded

XMLWordPrintable

    • Low

      Getting a null pointer exception when calling getProcessInstances() when no process instances were started:

      KnowledgeBase kbase = readKnowledgeBase();
      StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );
      Collection<ProcessInstance> pilist = ksession.getProcessInstances();  <-- exception here
      

      Exception stack:

      Exception in thread "main" java.lang.NullPointerException
      	at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.getProcessInstances(JPAProcessInstanceManager.java:97)
      	at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstances(ProcessRuntimeImpl.java:200)
      	at org.drools.common.AbstractWorkingMemory.getProcessInstances(AbstractWorkingMemory.java:1093)
      	at org.drools.impl.StatefulKnowledgeSessionImpl.getProcessInstances(StatefulKnowledgeSessionImpl.java:292)
      	at org.drools.command.runtime.process.GetProcessInstancesCommand.execute(GetProcessInstancesCommand.java:35)
      	at org.drools.command.runtime.process.GetProcessInstancesCommand.execute(GetProcessInstancesCommand.java:28)
      	at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
      	at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:345)
      	at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.getProcessInstances(CommandBasedStatefulKnowledgeSession.java:139)
      	at com.sample.ProcessMain.main(ProcessMain.java:69)
      

              marco.rietveld Marco Rietveld (Inactive)
              affandar Affan Dar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: