Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 5.1.0 GA, 5.1.0.PostGA
    • Fix Version/s: 5.1.0.PostGA
    • Component/s: BRE
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Execute the project JB2887.zip attached with this Jira case

      Show
      Execute the project JB2887.zip attached with this Jira case

      Description

      A rule such as
      rule "MESSAGE_FINE"
      salience 2
      when

      Message (value == "FINE")

      $listHolder : ListHolder()

      $coll1:ArrayList()
      from collect(Object() from $listHolder.getList())
      $coll2:ArrayList()
      from collect(Object() from $listHolder.getList())
      then
      System.out.println("Exceuting rule");
      end

      rule "MESSAGE_HELLO"
      salience 1
      when
      msg : Message(value != "HELLO" )
      then
      msg.setValue("HELLO");
      update(msg);
      System.out.println("Message: "+msg.getValue());
      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.

        Gliffy Diagrams

          Attachments

          1. DroolsTest.java
            5 kB
          2. JB2887.zip
            7 kB
          3. SampleAlarmRules.drl
            5 kB

            Issue Links

              Activity

                People

                • Assignee:
                  tsurdilovic Tihomir Surdilovic
                  Reporter:
                  alessandrolt Alessandro Lazarotti
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: