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

    Details

    • Estimated Difficulty:
      Low

      Description

      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)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                marco.rietveld Marco Rietveld
                Reporter:
                affandar Affan Dar
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: