[jboss-user] [JBoss jBPM] - NullpointerException at ProcessInstance.signal()

bdepaz do-not-reply at jboss.com
Mon Jul 17 08:40:11 EDT 2006


Hi,

I'm having a problem trying to signal a process for further execution. I'm running jBPM in a J2EE environment (on an OC4J for that matter). 
I'm having a MessageDrivenBean triggering a ProcessInstance for further execution, however it seems like the Token is not having a ProcessInstance. How is that possible?

I've implemented as described in the userguide:

  | JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
  | JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
  | GraphSession graphSession = jbpmContext.getGraphSession();
  | ProcessInstance pi = graphSession.loadProcessInstance(processId);
  | process.signal();
  | 

Output for that code is:

  | java.lang.NullPointerException
  |         at org.jbpm.graph.exe.Token.startCompositeLog(Token.java:306)
  |         at org.jbpm.graph.exe.Token.signal(Token.java:167)
  |         at org.jbpm.graph.exe.Token.signal(Token.java:123)
  |         at org.jbpm.graph.exe.Token$$FastClassByCGLIB$$74df1c6e.invoke(<generated>)
  |         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
  |         at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:161)
  |         at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$7e7b07a8.signal(<generated>)
  |         at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:217)
  |         at org.jbpm.graph.exe.ProcessInstance$$FastClassByCGLIB$$5167cc59.invoke(<generated>)
  |         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
  |         at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:161)
  |         at org.jbpm.graph.exe.ProcessInstance$$EnhancerByCGLIB$$fb69fd53.signal(<generated>)
  |         at be.cm.health.tpb.process.MetroplanInvoiceWorkflow.unlockMetroplanInstance(MetroplanInvoiceWorkflow.java:105)
  |         at be.cm.health.tpb.integrators.MetroplanListener.onMessage(MetroplanListener.java:58)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
  |         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
  |         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
  |         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
  |         at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:34)
  |         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
  |         at com.evermind.server.ejb.MessageDrivenConsumer.onMessage(MessageDrivenConsumer.java:344)
  |         at com.evermind.server.ejb.MessageDrivenConsumer.processMessages(MessageDrivenConsumer.java:230)
  |         at com.evermind.server.ejb.MessageDrivenConsumer.run(MessageDrivenConsumer.java:168)
  |         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
  |         at java.lang.Thread.run(Thread.java:595)
  | 

Now I've been debugging on that. The ProcessInstance is actually being returned, however, the ProcessInstance.token.processinstance is empty which is throwing the nullpointer here. (it needs it to get the LogginInstance).

Am I doing something wrong here? I've been trying to get the token in other ways, but so far that wasn't very successfull :-S.

my jbpm config:

  | <jbpm-configuration>
  |   <jbpm-context>
  |     <service name="persistence">
  |     	<factory>
  |     		<bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
  |     			<field name="isTransactionEnabled">
  |     				<false />
  |     			</field>
  |     		</bean>
  |     	</factory>
  |     </service>
  |     <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
  |     <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
  |     <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
  |     <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
  |   </jbpm-context>
  | </jbpm-configuration>
  | 

Sincerely appreciate all the help...

kind regards,
Bert

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958446#3958446

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958446



More information about the jboss-user mailing list