[jboss-jira] [JBoss JIRA] (DROOLS-1742) NPE in RuleNetworkEvaluator after incremental compilation
Jiri Locker (JIRA)
issues at jboss.org
Tue Sep 18 04:39:00 EDT 2018
[ https://issues.jboss.org/browse/DROOLS-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jiri Locker updated DROOLS-1742:
--------------------------------
Summary: NPE in RuleNetworkEvaluator after incremental compilation (was: NPE in RuleNEtworkEvaluator after incremental compilation)
> NPE in RuleNetworkEvaluator after incremental compilation
> ---------------------------------------------------------
>
> Key: DROOLS-1742
> URL: https://issues.jboss.org/browse/DROOLS-1742
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.3.0.Final
> Reporter: Théophane Charbonnier
> Assignee: Mario Fusco
> Attachments: drools-path-memory-reproducer.zip
>
>
> Having the following drl files :
> {code:drl}
> package org.hightea.a
> import org.drools.compiler.Message
> import org.drools.compiler.FirstClass
> rule "RG_1"
> when
> $event : Message()
> FirstClass(item1 == $event.message1)
> then
> System.out.println("RG_1");
> end
> {code}
> and
> {code:drl}
> package org.hightea.b
> import org.drools.compiler.Message
> import org.drools.compiler.SecondClass
> rule "RG_2"
> when
> $event: Message()
> SecondClass(item1 == $event.message1)
> then
> System.out.println("RG_2");
> end
> {code}
> We create a module containing the two packages in two drl files and insert a `SecondClass` fact in the WM.
> Then we want to incrementally update to a new module containing only the second DRL.
> At first fireAllrules after update, we encounter a NPE in RuleNetwork evaluator (a Segment memory is not defined in the path memory)
> {code:java}
> java.lang.NullPointerException
> at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:114)
> at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:212)
> at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:87)
> at org.drools.core.concurrent.AbstractRuleEvaluator.internalEvaluateAndFire(AbstractRuleEvaluator.java:34)
> at org.drools.core.concurrent.SequentialRuleEvaluator.evaluateAndFire(SequentialRuleEvaluator.java:43)
> at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1067)
> at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1014)
> at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1006)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1320)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1311)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1295)
> at org.hightea.IncrementalRemoveRuleTest.testNpeInRuleNetworkEvaluator(IncrementalRemoveRuleTest.java:66)
> {code}
> Note that we don't encounter this issue when the packages names are the same, or if we exchange the order of drl file name in the first module.
> A reproducer is attached with its source code at [https://github.com/hightea/drools-reproducer/tree/path-memory-issue|https://github.com/hightea/drools-reproducer/tree/path-memory-issue]
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list