]
RH Bugzilla Integration commented on DROOLS-998:
------------------------------------------------
Mario Fusco <mfusco(a)redhat.com> changed the Status of [bug
NullPointerException at
org.drools.core.common.LeftTupleSetsImpl.removeInsert(LeftTupleSetsImpl.java:141)
---------------------------------------------------------------------------------------------------------
Key: DROOLS-998
URL:
https://issues.jboss.org/browse/DROOLS-998
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 6.3.0.Final
Environment: OpenJDK Runtime Environment (IcedTea 2.6.3)
(7u91-2.6.3-0ubuntu0.14.04.1)
Reporter: Christian Spurk
Assignee: Mario Fusco
Fix For: 6.4.0.CR1
The following {{NullPointerException}} occurs for the following rule:
{code}
Exception in thread "main" java.lang.NullPointerException
at org.drools.core.common.LeftTupleSetsImpl.removeInsert(LeftTupleSetsImpl.java:141)
at org.drools.core.common.LeftTupleSetsImpl.addDelete(LeftTupleSetsImpl.java:80)
at
org.drools.core.phreak.PhreakAccumulateNode.doLeftDeletes(PhreakAccumulateNode.java:603)
at org.drools.core.phreak.PhreakAccumulateNode.doNode(PhreakAccumulateNode.java:65)
at
org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:565)
at
org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:536)
at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:372)
at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:332)
at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:166)
at
org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:123)
at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:194)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:142)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:74)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:978)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1292)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1294)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1281)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1260)
at
org.drools.core.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:109)
at
org.drools.core.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:34)
at
org.drools.core.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:292)
at Test.main(Test.java:13)
{code}
{code}
rule "test"
when
not( String() )
accumulate(
Long();
sum(1)
)
( Boolean() or not( Float() ) )
then
insert(new String());
end
{code}
(Please ignore the nonsensical rule; I simply couldn't reproduce this issue in any
better way without providing you my larger system where the (more complex) rule makes more
sense.)
I'm using a default KIE configuration to load the rule:
{{kmodule.xml}}:
{code}
<?xml version="1.0" encoding="UTF-8"?>
<kmodule
xmlns="http://jboss.org/kie/6.0.0/kmodule" />
{code}
{{Test.java}}:
{code}
import org.kie.api.KieBase;
import org.kie.api.KieServices;
import org.kie.api.runtime.StatelessKieSession;
import org.kie.internal.command.CommandFactory;
public class Test {
public static void main(String[] args) {
KieBase kieBase = KieServices.Factory.get().getKieClasspathContainer()
.getKieBase();
StatelessKieSession session = kieBase.newStatelessKieSession();
session.execute(CommandFactory.newFireAllRules());
}
}
{code}
This issue might be related with DROOLS-987.