[jboss-user] [jBPM] - NullPointerException while executing knowledgeSession.getProcessInstance
sc_boss
do-not-reply at jboss.com
Fri Feb 22 12:07:39 EST 2013
sc_boss [https://community.jboss.org/people/sc_boss] created the discussion
"NullPointerException while executing knowledgeSession.getProcessInstance"
To view the discussion, visit: https://community.jboss.org/message/799131#799131
--------------------------------------------------------------
I'm looking at some code here in 5.4.0 (jbpm-flow/5.4.0.Final/jbpm-flow-5.4.0.Final-sources.jar):
org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.readProcessInstance(MarshallerReaderContext)
it goes like this on line 373:
Process process = ruleBase.getProcess( processId );
if ( ruleBase != null ) {
processInstance.setProcess( process );
}
Isn't this code incorrect? If rule base were to be null it would have failed on the first line itself.
May be the code should be:
if ( *process* != null ) {
processInstance.setProcess( process );
}
Not sure.
I guess I'm running into this issue when i try to load the process instance:
ProcessInstance pid = ksession.getProcessInstance(16);
java.lang.NullPointerException
at org.jbpm.process.instance.impl.ProcessInstanceImpl.setProcess(ProcessInstanceImpl.java:62)
at org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.readProcessInstance(AbstractProtobufProcessInstanceMarshaller.java:375)
at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:142)
at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.getProcessInstance(JPAProcessInstanceManager.java:91)
at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstance(ProcessRuntimeImpl.java:206)
at org.drools.common.AbstractWorkingMemory.getProcessInstance(AbstractWorkingMemory.java:1116)
at org.drools.impl.StatefulKnowledgeSessionImpl.getProcessInstance(StatefulKnowledgeSessionImpl.java:297)
at org.drools.command.runtime.process.GetProcessInstanceCommand.execute(GetProcessInstanceCommand.java:48)
at org.drools.command.runtime.process.GetProcessInstanceCommand.execute(GetProcessInstanceCommand.java:25)
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.getProcessInstance(CommandBasedStatefulKnowledgeSession.java:125)
at com.sample.ProcessTest.main(ProcessTest.java:64)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/799131#799131]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130222/6cf1b40a/attachment.html
More information about the jboss-user
mailing list