[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2887) AccumulateNode runs into NPE
Alessandro Lazarotti (JIRA)
jira-events at lists.jboss.org
Tue Apr 12 14:09:33 EDT 2011
[ https://issues.jboss.org/browse/JBRULES-2887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595091#comment-12595091 ]
Alessandro Lazarotti commented on JBRULES-2887:
-----------------------------------------------
I requested to reopen this case because this issue still happens.
Attached to this Jira is a new test project (JB2887.zip) with a simplified pattern that demonstrates the problem.
It was tested with Drools 5.1.1 Final, SVN 5.1.x branch(/labs/jbossrules/branches/5.1.x/ ), BRMS 5.1, and last Drools 5.2 build (master branch in Apr/12/2011) - It fails in all.
The same pattern runs successfully in Drools 5.0.x or BRMS 5.0.x
> AccumulateNode runs into NPE
> ----------------------------
>
> Key: JBRULES-2887
> URL: https://issues.jboss.org/browse/JBRULES-2887
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-core
> Affects Versions: 5.1.1.FINAL
> Reporter: Wolfgang Laun
> Assignee: Edson Tirelli
> Priority: Critical
> Fix For: 5.2.0.M1
>
> Attachments: DroolsTest.java, JB2887.zip, SampleAlarmRules.drl
>
>
> A rule such as
> rule "average"
> when
> B( id < 10 )
> $list: List() from collect ( A() over window:time(10s) )
> Number( $avg: doubleValue ) from accumulate( A( $id : id ) from $list, average( $id ) )
> then
> System.out.println( "average = " + $avg );
> end
> runs into a NPE
> Caused by: java.lang.NullPointerException
> at org.drools.reteoo.AccumulateNode.getFirstMatch(AccumulateNode.java:967)
> at org.drools.reteoo.AccumulateNode.splitList(AccumulateNode.java:920)
> at org.drools.reteoo.AccumulateNode.removePreviousMatchesForLeftTuple(AccumulateNode.java:874)
> at org.drools.reteoo.AccumulateNode.retractLeftTuple(AccumulateNode.java:205)
> at org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:238)
> at org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateRetractLeftTupleDestroyRightTuple(CompositeLeftTupleSinkAdapter.java:138)
> at org.drools.reteoo.AccumulateNode.retractLeftTuple(AccumulateNode.java:212)
> at org.drools.reteoo.ModifyPreviousTuples.retractTuples(ModifyPreviousTuples.java:111)
> at org.drools.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:176)
> at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:450)
> at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:361)
> at org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:183)
> at org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:196)
> at event.Rule_launch_0.defaultConsequence(Rule_launch_0.java:7)
> at event.Rule_launch_0DefaultConsequenceInvoker.evaluate(Rule_launch_0DefaultConsequenceInvoker.java:33)
> at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:913)
> A null Parameter accctx is passed down from retractLeftTuple.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list