<br><font size=2 face="Trebuchet MS">Hi,</font>
<br><font size=2 face="Trebuchet MS">When I try to run a sample test case
using drools-persistence.jar it works successfully.</font>
<br><font size=2 face="Trebuchet MS">But when I try to include the persistence
in my OFBiz application, I am getting null pointer exception in class <b>JPAWorkItemManager.java.</b></font>
<br>
<br><font size=2 color=#000080 face="Courier New"><u>java.lang.NullPointerException</u></font><font size=2 face="Trebuchet MS"><b>
&nbsp;</b></font>
<br><font size=2 color=red face="Courier New">&nbsp;at org.drools.persistence.processinstance.JPAWorkItemManager.completeWorkItem(</font><font size=2 color=#000080 face="Courier New"><u>JPAWorkItemManager.java:85</u></font><font size=2 color=red face="Courier New">).</font>
<br>
<br><font size=2 face="Trebuchet MS">Null Pointer is because of getting
EntityManager object as NULL. In the below line of JPAWorkItemManager.java</font>
<br><font size=2 face="Courier New">&nbsp; EntityManager em = (EntityManager)
</font><font size=2 color=#820040 face="Courier New"><b>this</b></font><font size=2 face="Courier New">.</font><font size=2 color=#0021bf face="Courier New">workingMemory</font><font size=2 face="Courier New">.getEnvironment().get(
EnvironmentName.</font><font size=2 color=#0021bf face="Courier New"><i>ENTITY_MANAGER</i></font><font size=2 face="Courier New">
);</font>
<br><font size=2 face="Trebuchet MS">the em is null.</font>
<br><font size=2 face="Trebuchet MS">Because of this I am getting Null
Pointer exception when it try to run the code</font>
<br><font size=2 face="Courier New">&nbsp;</font><font size=2 color=#820040 face="Courier New"><b>if</b></font><font size=2 face="Courier New">
(workItemInfo == </font><font size=2 color=#820040 face="Courier New"><b>null</b></font><font size=2 face="Courier New">)
{</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; workItemInfo = em.find(WorkItemInfo.</font><font size=2 color=#820040 face="Courier New"><b>class</b></font><font size=2 face="Courier New">,
id);</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp; &nbsp; }</font>
<br><font size=2 face="Trebuchet MS">&nbsp;</font>
<br><font size=2 face="Trebuchet MS">Can you tell me why I getting NPE
when I try to run the jar file in my application.</font>
<br><font size=2 face="Trebuchet MS">While the code run successfully when
I try to run sample test case for that.</font>
<br><font size=2 face="Trebuchet MS">Please help me to get through the
situation.</font>
<br>
<br>
<br><font size=2 face="Trebuchet MS">Thanks &amp; Regards<br>
<br>
Pardeep Ruhil<br>
L&amp;T Infotech Ltd<br>
Mumbai<br>
Ph: +919820283884<br>
<b><br>
Larsen &amp; Toubro Infotech Ltd.</b></font><font size=2 color=blue face="Trebuchet MS"><u><br>
</u></font><a href=http://www.lntinfotech.com/><font size=2 color=blue face="Trebuchet MS"><u>www.Lntinfotech.com</u></font></a><font size=2 face="Trebuchet MS"><br>
<br>
This Document is classified as: <br>
<br>
</font><input type=checkbox name=F1_chkbox checked value=on><font size=2 face="Trebuchet MS">L&amp;T
Infotech Proprietary &nbsp; </font><input type=checkbox name=F1_chkbox value=on><font size=2 face="Trebuchet MS">L&amp;T
Infotech Confidential &nbsp; </font><input type=checkbox name=F1_chkbox value=on><font size=2 face="Trebuchet MS">L&amp;T
Infotech Internal Use Only &nbsp; </font><input type=checkbox name=F1_chkbox value=on><font size=2 face="Trebuchet MS">L&amp;T
Infotech General Business &nbsp; <br>
<br>
This Email may contain confidential or privileged information for the intended
recipient (s) If you are not the intended recipient, please do not use
or disseminate the information, notify the sender and delete it from your
system. </font>
<BR>
______________________________________________________________________<BR>