1 Reply Latest reply on Jul 12, 2012 1:25 AM by hiro.y

    NullPointerException when try to getProcessInstance

    liliana.iovanovici Newbie

      Hello,

       

      I am trying to start a process and after a while to send a signal to process.

      I got the an exception:

       

      java.lang.NullPointerException

          at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)

          at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:128)

          at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.getProcessInstance(JPAProcessInstanceManager.java:82)

          at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstance(ProcessRuntimeImpl.java:204)

          at org.drools.common.AbstractWorkingMemory.getProcessInstance(AbstractWorkingMemory.java:1097)

          at org.drools.impl.StatefulKnowledgeSessionImpl.getProcessInstance(StatefulKnowledgeSessionImpl.java:283)

          at org.drools.command.runtime.process.SignalEventCommand.execute(SignalEventCommand.java:93)

          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.signalEvent(CommandBasedStatefulKnowledgeSession.java:210)

            ................................................................................

          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:597)

          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)

          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)

          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

          at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)

          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)

       

          .........................................................................................................   

       

       

      I saw that when try to get process instances in ProcessInstanceInfo class, processInstanceByteArray is null.

      This is happening only when I send the signal after a while, not immediatly.

      Note: I am using openjpa for persistence.

       

      Thanks for help,

       

      Liliana