Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-56

Drools execution fails with ArrayIndexOutOfBoundsException in RuleNetworkEvaluator.doRiaNode​

    Details

    • Target Release:
    • Fix Build:
      CR1

      Description

      Rules execuion is randomly failing with an ArrayIndexOutOfBoundsException: at RuleNetworkEvaluator.doRiaNode(RuleNetworkEvaluator.java:558) (see full stacktrace below).

      Some interesting aspects:

      1. This happens only if the ksession is built from RuntimeManager/RuntimeEngine. If the ksession is created using the 'kie' approach, no exception occurs.

      2. The exception is only seen on subsequent executions of the ksession.

      3. The exception is related to rules which are almost identidcal, but one contains an additional 'NOT' constraint in the LHS.

      java.lang.ArrayIndexOutOfBoundsException: 3
              at org.drools.core.phreak.RuleNetworkEvaluator.doRiaNode(RuleNetworkEvaluator.java:558)
              at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:500)
              at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:341)
              at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:301)
              at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:136)
              at org.drools.core.phreak.AddRemoveRule.forceFlushLeftTuple(AddRemoveRule.java:682)
              at org.drools.core.phreak.AddRemoveRule.flushLeftTupleIfNecessary(AddRemoveRule.java:643)
              at org.drools.core.phreak.AddRemoveRule.flushLeftTupleIfNecessary(AddRemoveRule.java:616)
              at org.drools.core.reteoo.BetaNode.assertObject(BetaNode.java:299)
              at org.drools.core.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:63)
              at org.drools.core.reteoo.ObjectTypeNode.propagateAssert(ObjectTypeNode.java:304)
              at org.drools.core.phreak.PropagationEntry$Insert.execute(PropagationEntry.java:141)
              at org.drools.core.phreak.SynchronizedBypassPropagationList$1.execute(SynchronizedBypassPropagationList.java:37)
              at org.drools.core.common.DefaultAgenda.executeTask(DefaultAgenda.java:1420)
              at org.drools.core.phreak.SynchronizedBypassPropagationList.addEntry(SynchronizedBypassPropagationList.java:32)
              at org.drools.core.impl.StatefulKnowledgeSessionImpl.addPropagation(StatefulKnowledgeSessionImpl.java:2101)
              at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:225)
              at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:278)
              at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:239)
              at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:144)
              at org.drools.core.command.runtime.rule.InsertElementsCommand.execute(InsertElementsCommand.java:93)
              at org.drools.core.command.runtime.rule.InsertElementsCommand.execute(InsertElementsCommand.java:40)
              at org.drools.core.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:137)
              at org.drools.core.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:51)
              at org.drools.core.impl.StatefulKnowledgeSessionImpl.execute(StatefulKnowledgeSessionImpl.java:747)
              at org.drools.core.impl.StatefulKnowledgeSessionImpl.execute(StatefulKnowledgeSessionImpl.java:721)
              at DroolsReproducerTest.testBxMSIntegration(DroolsReproducerTest.java:79)
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mfusco Mario Fusco
                  Reporter:
                  mputz Martin Weiler
                  Tester:
                  Tibor Zimanyi
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: