<br><br>      Dirk,<br><br>      The problem seems not related to shadow facts, but to constraint resolution and fact data extraction. It might be a bug or not... need more info. <br>      In any case, the offending rule is not the one you showed. The offending rule contains a double beta constraint in a join:<br>
<br>org.drools.common.<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">DoubleBetaConstraints.isAllowedCachedRight(DoubleBetaConstraints.java:164)<br>

        at org.drools.reteoo.JoinNode.retractObject(JoinNode.java:189)</blockquote><div><br>      Can you narrow it down? Did you tried with Drools 5.0.1? <br></div><br>      []s<br>      Edson<br><br><div class="gmail_quote">
2009/6/24 Dirk Bergstrom <span dir="ltr">&lt;<a href="mailto:dirk@juniper.net">dirk@juniper.net</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m running into an NPE using Drools 4.0.7, and I&#39;m stumped by it (stacktrace<br>
below).  I made some changes to seemingly unrelated code, and this error started<br>
showing up.  It would help me to understand what&#39;s going on if someone could<br>
tell me roughly what&#39;s going on here.  Since the error is thrown by generated<br>
code (in what I assume is a shadow proxy), I can&#39;t tell what the offending null<br>
pointer is.  I&#39;m not even entirely sure what&#39;s triggering the bug (it happens<br>
half an hour into the run of big multi-threaded application with about 40K<br>
objects in the working memory).<br>
<br>
Is this happening because:<br>
<br>
*) getRli_nums() in one of my PRRecord objects is returning a null value?<br>
<br>
*) There is a null PRRecord object backing the shadow proxy?<br>
<br>
*) Some other thing is null?<br>
<br>
*) I&#39;m running into a bug in Drools?<br>
<br>
I stuck in this rule:<br>
<br>
when<br>
 $pr : PRRecord( rli_nums == null )<br>
then<br>
 System.out.println($pr.getId());<br>
end<br>
<br>
And it didn&#39;t print anything, so I&#39;m inclined to think that this is not a simple<br>
matter of something returning a null value...<br>
<br>
I&#39;ll be most appreciative of any help I can get.<br>
<br>
Here&#39;s the stacktrace:<br>
<br>
java.lang.NullPointerException<br>
        at<br>
org.drools.base.net.juniper.dash.data.PRRecord13409648$getRli_nums.getValue(Unknown<br>
Source)<br>
        at<br>
org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:127)<br>
        at<br>
org.drools.base.evaluators.BaseMemberOfEvaluator.evaluateCachedRight(BaseMemberOfEvaluator.java:45)<br>
        at<br>
org.drools.rule.VariableRestriction.isAllowedCachedRight(VariableRestriction.java:89)<br>
        at<br>
org.drools.rule.VariableConstraint.isAllowedCachedRight(VariableConstraint.java:81)<br>
        at<br>
org.drools.common.DoubleBetaConstraints.isAllowedCachedRight(DoubleBetaConstraints.java:164)<br>
        at org.drools.reteoo.JoinNode.retractObject(JoinNode.java:189)<br>
        at<br>
org.drools.reteoo.CompositeObjectSinkAdapter.propagateRetractObject(CompositeObjectSinkAdapter.java:375)<br>
        at org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:189)<br>
        at org.drools.reteoo.Rete.retractObject(Rete.java:215)<br>
        at org.drools.reteoo.ReteooRuleBase.retractObject(ReteooRuleBase.java:211)<br>
        at<br>
org.drools.reteoo.ReteooWorkingMemory.doRetract(ReteooWorkingMemory.java:79)<br>
        at<br>
org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1250)<br>
        at<br>
org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1203)<br>
        at<br>
net.juniper.dash.data.DataSource.reconcileAssertedRecords(DataSource.java:409)<br>
<br>
--<br>
<font color="#888888">Dirk Bergstrom               <a href="mailto:dirk@juniper.net">dirk@juniper.net</a><br>
_____________________________________________<br>
Juniper Networks Inc.,          Computer Geek<br>
Tel: 408.745.3182           Fax: 408.745.8905<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>
</font></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>