<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="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> 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">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">www.jboss.com</a>