<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR>
<STYLE title=owaParaStyle>P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY ocsi="x">
<DIV dir=ltr align=left><SPAN class=190513213-10032008><FONT face=Arial
color=#0000ff size=2>Not with Drools.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=190513213-10032008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=190513213-10032008><FONT face=Arial
color=#0000ff size=2>Happy for you to discount though; it was just an
idea.</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Jason
Partyka<BR><B>Sent:</B> 10 March 2008 12:51<BR><B>To:</B> Rules Users
List<BR><B>Subject:</B> RE: [rules-users] Interesting null pointer exception
when insertingafact.<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr><FONT face=Tahoma color=#000000 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><FONT face=tahoma size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=tahoma size=2>Have you encountered this problem
yourself?</FONT></DIV>
<DIV dir=ltr><FONT face=tahoma size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=tahoma size=2>-Jason</FONT></DIV>
<DIV dir=ltr><FONT face=tahoma size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=tahoma size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=tahoma size=2></FONT> </DIV>
<DIV id=divRpF839794 style="DIRECTION: ltr">
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org
[rules-users-bounces@lists.jboss.org] On Behalf Of Anstis, Michael (M.)
[manstis1@ford.com]<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>
<DIV>
<DIV dir=ltr align=left><SPAN class=450020310-10032008><FONT face=Arial
color=#0000ff size=2>I'm no expert but recall there can be problems running
"long running" (subjective) code from AWT's worker
thread.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=450020310-10032008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=450020310-10032008><FONT face=Arial
color=#0000ff size=2>I thought it was good practice to run your "application
code" in a worker thread. This was the first google hit I had on the
matter. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=450020310-10032008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=450020310-10032008><FONT face=Arial
color=#0000ff size=2><A
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><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=450020310-10032008><FONT face=Arial
color=#0000ff size=2>Cheers,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=450020310-10032008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=450020310-10032008><FONT face=Arial
color=#0000ff size=2>Mike</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <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>
<DIV></DIV><BR> Jason,<BR><BR> 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> []s<BR> Edson<BR><BR>
<DIV><SPAN class=gmail_quote>2008/3/7, Jason Partyka <<A
href="mailto:Jason.Partyka@hightowerinc.com">Jason.Partyka@hightowerinc.com</A>>:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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> at
org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:76)<BR> at
org.drools.reteoo.EvalConditionNode.assertTuple(EvalConditionNode.java:145)<BR> at
org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)<BR> at
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116)<BR> at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)<BR> at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)<BR> at
org.drools.reteoo.Rete.assertObject(Rete.java:177)<BR> at
org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)<BR> at
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)<BR> at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)<BR> at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:858)<BR> at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:659)<BR> at
com.hightower.drools.executablerules.Rules.setTemplate(Rules.java:112)<BR>....<BR>Caused
by: java.lang.NullPointerException<BR> at
org.drools.base.mvel.MVELEvalExpression.evaluate(MVELEvalExpression.java:39)<BR> at
org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:72)<BR> ...
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
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A><BR><A
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> Edson Tirelli<BR> JBoss Drools
Core Development<BR> Office: +55 11
3529-6000<BR> Mobile: +55 11 9287-5646<BR> JBoss, a
division of Red Hat @ <A href="http://www.jboss.com"
target=_blank>www.jboss.com</A> </BLOCKQUOTE></DIV></BLOCKQUOTE></BODY></HTML>