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)
- is caused by
-
DROOLS-1739 Missing creation of the segment memory of a subnetwork when the main segment memory is created from a prototype
- Closed
- is cloned by
-
RHBRMS-2971 [GSS](6.4.z) Drools execution fails with ArrayIndexOutOfBoundsException in RuleNetworkEvaluator.doRiaNode
- Verified