[rules-users] NPE with modify
Edson Tirelli
tirelli at post.com
Thu Jan 25 06:41:46 EST 2007
Scott,
Seems like a bug to me.
May I ask you please to zip a self contained sample and open a JIRA?
I will fix that.
BTW, 3.0.5 is the lates version and fix some important issues, so you
may want to update and test. But I don't remember fixing anything
related to that, so probably you need to open the JIRA anyway.
Thank you,
Edson
Scott Reed wrote:
> I am getting an NPE when I uncomment the modify call in the rule below.
> I am running version 3.0.4.
> I'd appreciate any ideas as to why this is happening.
> Thanks,
> Scott
>
> rule "TEST"
> when
> $paystub: Paystub( $grossPay: grossPay )
> eval( $grossPay.getState() == FPConstants.INACTIVE )
> then
> $grossPay.setState( FPConstants.READY );
> //modify( $paystub );
> end
>
> With modify uncommented I get the following exception:
>
> java.lang.NullPointerException
> at org.drools.reteoo.beta.DefaultRightMemory.remove(Unknown Source)
> at org.drools.reteoo.BetaMemory.remove(Unknown Source)
> at org.drools.reteoo.JoinNode.modifyObject(Unknown Source)
> at org.drools.reteoo.ObjectSource.propagateModifyObject(Unknown Source)
> at org.drools.reteoo.ObjectTypeNode.modifyObject(Unknown Source)
> at org.drools.reteoo.Rete.modifyObject(Unknown Source)
> at org.drools.reteoo.ReteooRuleBase.modifyObject(Unknown Source)
> at org.drools.reteoo.ReteooWorkingMemory.modifyObject(Unknown Source)
> at org.drools.base.DefaultKnowledgeHelper.modifyObject(Unknown Source)
> at
> org.fp.findata.Rule_Precalc___TEST_0.consequence(Rule_Precalc___TEST_0.java:14)
>
>
> at
> org.fp.findata.Rule_Precalc___TEST_0ConsequenceInvoker.evaluate(Rule_Precalc___TEST_0ConsequenceInvoker.java:29)
>
>
> at org.drools.common.DefaultAgenda.fireActivation(Unknown Source)
> at org.drools.common.DefaultAgenda.fireNextItem(Unknown Source)
> at org.drools.common.AbstractWorkingMemory.fireAllRules(Unknown Source)
> at org.drools.common.AbstractWorkingMemory.fireAllRules(Unknown Source)
> at
> org.fp.util.RuleEngineManager$RunTask.run(RuleEngineManager.java:159)
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3124-6000
Mobile: +55 11 9218-4151
JBoss, a division of Red Hat @ www.jboss.com
More information about the rules-users
mailing list