[
https://issues.redhat.com/browse/DROOLS-5405?page=com.atlassian.jira.plug...
]
Mario Fusco commented on DROOLS-5405:
-------------------------------------
Without a reproducer it's impossible to understand what's happening there. Can you
please provide one? Even if it doesn't cause the NPE in 100% of runnings it would be
still useful to have some hints about what's happening there.
In theory the AgendaItem should be created inside the PathMemory the first time that the
path is linked and if the path has never been linked I don't see how could there be a
terminal left tuple to be deleted for the corresponding rule when the rule itself is
removed. Could this be a race condition? Is the same KieSession shared among multiple
threads in your environment?
Any further hint to track this down is welcome.
NPE removing a rule from KieBase
--------------------------------
Key: DROOLS-5405
URL:
https://issues.redhat.com/browse/DROOLS-5405
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.37.0.Final
Reporter: dianle zhang
Assignee: Mario Fusco
Priority: Major
removing a rule from KieBase causes the following NPE:
java.lang.NullPointerException: null
at org.drools.core.phreak.AddRemoveRule.iterateLeftTuple(AddRemoveRule.java:1063)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
at org.drools.core.phreak.AddRemoveRule.visitChild(AddRemoveRule.java:978)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
at
org.drools.core.phreak.AddRemoveRule.lambda$processLeftTuplesOnLian$1(AddRemoveRule.java:936)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
at
org.drools.core.common.DefaultFactHandle$SingleLinkedTuples.forEachLeftTuple(DefaultFactHandle.java:727)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
at org.drools.core.common.DefaultFactHandle.forEachLeftTuple(DefaultFactHandle.java:923)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
at org.drools.core.phreak.AddRemoveRule.processLeftTuplesOnLian(AddRemoveRule.java:931)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
at org.drools.core.phreak.AddRemoveRule.processLeftTuples(AddRemoveRule.java:856)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
at org.drools.core.phreak.AddRemoveRule.removeRule(AddRemoveRule.java:173)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
at org.drools.core.reteoo.ReteooBuilder.removeTerminalNode(ReteooBuilder.java:191)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
at org.drools.core.reteoo.ReteooBuilder.removeRules(ReteooBuilder.java:177)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
at
org.drools.core.impl.KnowledgeBaseImpl.lambda$removeRule$6(KnowledgeBaseImpl.java:1553)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
at
org.drools.core.impl.KnowledgeBaseImpl.enqueueModification(KnowledgeBaseImpl.java:745)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
at org.drools.core.impl.KnowledgeBaseImpl.removeRule(KnowledgeBaseImpl.java:1537)
~[drools-core-7.37.0.Final.jar:7.37.0.Final]
--
This message was sent by Atlassian Jira
(v8.13.1#813001)