-
Bug
-
Resolution: Obsolete
-
Major
-
jBPM 5.2
-
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)