<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
NullPointerException when try to getProcessInstance
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/liliana.iovanovici">liliana.iovanovici</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/735403#735403">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hello,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I am trying to start a process and after a while to send a signal to process.</p><p>I got the an exception: </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>java.lang.NullPointerException</p><p>    at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:89)</p><p>    at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:128)</p><p>    at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.getProcessInstance(JPAProcessInstanceManager.java:82)</p><p>    at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstance(ProcessRuntimeImpl.java:204)</p><p>    at org.drools.common.AbstractWorkingMemory.getProcessInstance(AbstractWorkingMemory.java:1097)</p><p>    at org.drools.impl.StatefulKnowledgeSessionImpl.getProcessInstance(StatefulKnowledgeSessionImpl.java:283)</p><p>    at org.drools.command.runtime.process.SignalEventCommand.execute(SignalEventCommand.java:93)</p><p>    at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)</p><p>    at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:345)</p><p>    at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.signalEvent(CommandBasedStatefulKnowledgeSession.java:210)</p><p>    at com.aciworldwide.aps.adf.core.adapter.orchestration.jbpm5.JbpmApiHelperLocalImpl.signalProcess(JbpmApiHelperLocalImpl.java:86)</p><p>    at com.aciworldwide.aps.adf.core.adapter.orchestration.jbpm5.OrchestrationAdapterJbpmImpl.completeTask(OrchestrationAdapterJbpmImpl.java:203)</p><p>    at com.aciworldwide.aps.adf.core.service.orchestration.HumanTaskServiceImpl.completeTask(HumanTaskServiceImpl.java:103)</p><p>    at com.aciworldwide.aps.adf.core.service.orchestration.OrchestrationServiceImpl.completeTask(OrchestrationServiceImpl.java:170)</p><p>    at com.dev.test.biz.payment.PaymentServiceImpl.completeSubmitPaymentTask(PaymentServiceImpl.java:259)</p><p>    at com.dev.test.biz.payment.PaymentServiceImpl.submitPaymentTask(PaymentServiceImpl.java:232)</p><p>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</p><p>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</p><p>    at java.lang.reflect.Method.invoke(Method.java:597)</p><p>    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)</p><p>    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)</p><p>    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)</p><p>    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)</p><p>    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)</p><p>    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)</p><p>    at $Proxy41.submitPaymentTask(Unknown Source)</p><p>    at com.dev.test.web.impl.delegate.payment.PaymentServiceDelegateImpl.submitPayment(PaymentServiceDelegateImpl.java:215)</p><p>    at com.dev.test.web.impl.controller.payment.PaymentActionControllerImpl.handleSubmitPayment(PaymentActionControllerImpl.java:89)</p><p>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</p><p>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</p><p>    at java.lang.reflect.Method.invoke(Method.java:597)</p><p>    at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)</p><p>    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)</p><p>    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)</p><p>    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)</p><p>    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)</p><p>    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)</p><p>    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)</p><p>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)</p><p>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)</p><p>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)</p><p>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I saw that when try to get process instances in ProcessInstanceInfo class, processInstanceByteArray is null. </p><p>This is happening only when I send the signal after a while, not immediatly. </p><p>Note: I am using openjpa for persistence. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks for help,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Liliana</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/735403#735403">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>