I'm running into an NPE using Drools 4.0.7, and I'm stumped by it (stacktrace
below). I made some changes to seemingly unrelated code, and this error started
showing up. It would help me to understand what's going on if someone could
tell me roughly what's going on here. Since the error is thrown by generated
code (in what I assume is a shadow proxy), I can't tell what the offending null
pointer is. I'm not even entirely sure what's triggering the bug (it happens
half an hour into the run of big multi-threaded application with about 40K
objects in the working memory).
Is this happening because:
*) getRli_nums() in one of my PRRecord objects is returning a null value?
*) There is a null PRRecord object backing the shadow proxy?
*) Some other thing is null?
*) I'm running into a bug in Drools?
I stuck in this rule:
when
$pr : PRRecord( rli_nums == null )
then
System.out.println($pr.getId());
end
And it didn't print anything, so I'm inclined to think that this is not a simple
matter of something returning a null value...
I'll be most appreciative of any help I can get.
Here's the stacktrace:
java.lang.NullPointerException
at
org.drools.base.net.juniper.dash.data.PRRecord13409648$getRli_nums.getValue(Unknown
Source)
at
org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:127)
at
org.drools.base.evaluators.BaseMemberOfEvaluator.evaluateCachedRight(BaseMemberOfEvaluator.java:45)
at
org.drools.rule.VariableRestriction.isAllowedCachedRight(VariableRestriction.java:89)
at
org.drools.rule.VariableConstraint.isAllowedCachedRight(VariableConstraint.java:81)
at
org.drools.common.DoubleBetaConstraints.isAllowedCachedRight(DoubleBetaConstraints.java:164)
at org.drools.reteoo.JoinNode.retractObject(JoinNode.java:189)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateRetractObject(CompositeObjectSinkAdapter.java:375)
at org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:189)
at org.drools.reteoo.Rete.retractObject(Rete.java:215)
at org.drools.reteoo.ReteooRuleBase.retractObject(ReteooRuleBase.java:211)
at
org.drools.reteoo.ReteooWorkingMemory.doRetract(ReteooWorkingMemory.java:79)
at
org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1250)
at
org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1203)
at
net.juniper.dash.data.DataSource.reconcileAssertedRecords(DataSource.java:409)
--
Dirk Bergstrom dirk(a)juniper.net
_____________________________________________
Juniper Networks Inc., Computer Geek
Tel: 408.745.3182 Fax: 408.745.8905