<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Jason Partyka wrote:
<blockquote
 cite="mid:141533D03811414094F4F37EE45ADE17763C6D85FF@hti-exchange.IL.Hightowerinc.com"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="MSHTML 6.00.6000.16609" name="GENERATOR">
  <div dir="ltr"><font color="#000000" face="Tahoma" size="2">It looks
like the bug is still in there.</font></div>
  <div dir="ltr">&nbsp;</div>
  <div dir="ltr"><font face="tahoma" size="2">I am attempting to
resolve it myself, but in order to do so I need to go into the MVEL
code, but the mvel jar that is included as part of the drools classpath
container (within eclipse) is just mvel14.jar. So I'm not sure where
the source is or what version of MVEL source I should be attaching. I
realize that the source-location thing is just an Eclipse issue, but I
thought I'd let you know right away that it looks like it's still there.</font></div>
</blockquote>
We strip jar version numbers to make deployment with Eclipse easier. If
you look at parent pom.xml it will tell you the version of MVEL used.<br>
<blockquote
 cite="mid:141533D03811414094F4F37EE45ADE17763C6D85FF@hti-exchange.IL.Hightowerinc.com"
 type="cite">
  <div dir="ltr">&nbsp;</div>
  <div dir="ltr"><font face="tahoma" size="2">Anywhere you can point me
to that would help with making sure I'm looking the right code.</font></div>
  <div dir="ltr">&nbsp;</div>
  <div dir="ltr"><font face="tahoma" size="2">Thanks,</font></div>
  <div dir="ltr"><font face="tahoma" size="2">Jason</font></div>
  <div id="divRpF354217" style="direction: ltr;">
  <hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b>
<a class="moz-txt-link-abbreviated" href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>
[<a class="moz-txt-link-abbreviated" href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>] On Behalf Of Mark Proctor
[<a class="moz-txt-link-abbreviated" href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>]<br>
  <b>Sent:</b> Monday, March 10, 2008 8:17 AM<br>
  <b>To:</b> Rules Users List<br>
  <b>Subject:</b> Re: [rules-users] Interesting null pointer exception
when inserting afact.<br>
  </font><br>
  </div>
  <div>please check with 4.0.x, which will be in 4.0.5 this week, and
let us know if this is fixed or not. But hurry we are releasing 4.0.5
very soon:<br>
  <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/"
 target="_blank">http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/</a><br>
  <br>
Mark<br>
Jason Partyka wrote:
  <blockquote type="cite">
    <style title="owaParaStyle">P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
    </style>
    <div dir="ltr"><font color="#000000" face="Tahoma" size="2">I can
give this a shot, but the reason why you suggest this is not obvious to
me.
    </font></div>
    <div dir="ltr">&nbsp;</div>
    <div dir="ltr"><font face="tahoma" size="2">Have you encountered
this problem yourself?</font></div>
    <div dir="ltr">&nbsp;</div>
    <div dir="ltr"><font face="tahoma" size="2">-Jason</font></div>
    <div dir="ltr">&nbsp;</div>
    <div dir="ltr">&nbsp;</div>
    <div dir="ltr">&nbsp;</div>
    <div id="divRpF839794" style="direction: ltr;">
    <hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b> <a
 moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:rules-users-bounces@lists.jboss.org">
rules-users-bounces@lists.jboss.org</a> [<a moz-do-not-send="true"
 class="moz-txt-link-abbreviated"
 href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>]
On Behalf Of Anstis, Michael (M.) [<a moz-do-not-send="true"
 class="moz-txt-link-abbreviated" href="mailto:manstis1@ford.com">manstis1@ford.com</a>]<br>
    <b>Sent:</b> Monday, March 10, 2008 5:06 AM<br>
    <b>To:</b> Rules Users List<br>
    <b>Subject:</b> RE: [rules-users] Interesting null pointer
exception when inserting afact.<br>
    </font><br>
    </div>
    <div>
    <div dir="ltr" align="left"><span class="450020310-10032008"><font
 color="#0000ff" face="Arial" size="2">I'm no expert but recall there
can be problems running "long running"&nbsp;(subjective) code from AWT's
worker thread.</font></span></div>
    <div dir="ltr" align="left"><span class="450020310-10032008"></span>&nbsp;</div>
    <div dir="ltr" align="left"><span class="450020310-10032008"><font
 color="#0000ff" face="Arial" size="2">I thought it was good practice
to run your "application code" in a worker thread. This&nbsp;was the first
google hit I had on the matter.&nbsp;</font></span></div>
    <div dir="ltr" align="left"><span class="450020310-10032008"></span>&nbsp;</div>
    <div dir="ltr" align="left"><span class="450020310-10032008"><font
 color="#0000ff" face="Arial" size="2"><a moz-do-not-send="true"
 href="http://www.cs.helsinki.fi/u/vihavain/k03/Java/JavathreadsandGUI.html"
 target="_blank">http://www.cs.helsinki.fi/u/vihavain/k03/Java/JavathreadsandGUI.html</a></font></span></div>
    <div dir="ltr" align="left"><span class="450020310-10032008"></span>&nbsp;</div>
    <div dir="ltr" align="left"><span class="450020310-10032008"><font
 color="#0000ff" face="Arial" size="2">Cheers,</font></span></div>
    <div dir="ltr" align="left"><span class="450020310-10032008"></span>&nbsp;</div>
    <div dir="ltr" align="left"><span class="450020310-10032008"><font
 color="#0000ff" face="Arial" size="2">Mike</font></span></div>
    <br>
    <blockquote style="margin-right: 0px;">
      <div class="OutlookMessageHeader" dir="ltr" align="left"
 lang="en-us">
      <hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b> <a
 moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:rules-users-bounces@lists.jboss.org">
rules-users-bounces@lists.jboss.org</a> [<a moz-do-not-send="true"
 class="moz-txt-link-freetext"
 href="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</a>]
      <b>On Behalf Of </b>Edson Tirelli<br>
      <b>Sent:</b> 08 March 2008 13:15<br>
      <b>To:</b> Rules Users List<br>
      <b>Subject:</b> Re: [rules-users] Interesting null pointer
exception when inserting afact.<br>
      </font><br>
      </div>
      <br>
&nbsp;&nbsp; Jason,<br>
      <br>
&nbsp;&nbsp; Can you please isolate and show us the rule that is creating the
problem? It is happening either in a eval() statement or in a nested
property access.<br>
      <br>
&nbsp;&nbsp;&nbsp; []s<br>
&nbsp;&nbsp;&nbsp; Edson<br>
      <br>
      <div><span class="gmail_quote">2008/3/7, Jason Partyka &lt;<a
 moz-do-not-send="true" href="mailto:Jason.Partyka@hightowerinc.com">Jason.Partyka@hightowerinc.com</a>&gt;:</span>
      <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
        <br>
This is in relation to drools 4.0.4<br>
        <br>
I have an interesting problem. I am getting a null pointer exception
when I am inserting a fact into a StatefulSession object. What is odd
about this NPE is that, as far as I can tell (and I have inserted a
breakpoint right before I insert the fact) that all the properties in
the object are initialized, and there are no rules accessing any thing
that could be null.<br>
        <br>
So here's my exception trace (just first few lines to get context):<br>
        <br>
Exception in thread "AWT-EventQueue-0"
org.drools.RuntimeDroolsException: java.lang.NullPointerException<br>
&nbsp;&nbsp;at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:76)<br>
&nbsp;&nbsp;at
org.drools.reteoo.EvalConditionNode.assertTuple(EvalConditionNode.java:145)<br>
&nbsp;&nbsp;at
org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)<br>
&nbsp;&nbsp;at
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116)<br>
&nbsp;&nbsp;at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)<br>
&nbsp;&nbsp;at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)<br>
&nbsp;&nbsp;at org.drools.reteoo.Rete.assertObject(Rete.java:177)<br>
&nbsp;&nbsp;at
org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)<br>
&nbsp;&nbsp;at
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)<br>
&nbsp;&nbsp;at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)<br>
&nbsp;&nbsp;at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:858)<br>
&nbsp;&nbsp;at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:659)<br>
&nbsp;&nbsp;at
com.hightower.drools.executablerules.Rules.setTemplate(Rules.java:112)<br>
....<br>
Caused by: java.lang.NullPointerException<br>
&nbsp;&nbsp;at
org.drools.base.mvel.MVELEvalExpression.evaluate(MVELEvalExpression.java:39)<br>
&nbsp;&nbsp;at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:72)<br>
&nbsp;&nbsp;... 39 more<br>
        <br>
        <br>
(that setTemplate method is not a drools template)<br>
        <br>
Any ideas?<br>
        <br>
Thanks,<br>
Jason<br>
        <br>
_______________________________________________<br>
rules-users mailing list<br>
        <a moz-do-not-send="true"
 href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
        <a moz-do-not-send="true"
 href="https://lists.jboss.org/mailman/listinfo/rules-users"
 target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
      </blockquote>
      </div>
      <br>
      <br clear="all">
      <br>
-- <br>
&nbsp;&nbsp;Edson Tirelli<br>
&nbsp;&nbsp;JBoss Drools Core Development<br>
&nbsp;&nbsp;Office: +55 11 3529-6000<br>
&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>
&nbsp;&nbsp;JBoss, a division of Red Hat @ <a moz-do-not-send="true"
 href="http://www.jboss.com" target="_blank">www.jboss.com</a>
    </blockquote>
    </div>
    <pre><hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="https://lists.jboss.org/mailman/listinfo/rules-users"
 target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </pre>
  </blockquote>
  <br>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </pre>
</blockquote>
<br>
</body>
</html>