In Stream mode a path memory can have a RuleAgendaItem even if the path has been never totally linked and then it misses the first segment memory. When an incremental compilation tries to remove the rule for that path the following exception is thrown:
java.lang.NullPointerException at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:70) at org.drools.core.phreak.AddRemoveRule.flushStagedTuples(AddRemoveRule.java:547) at org.drools.core.phreak.AddRemoveRule.removeRule(AddRemoveRule.java:178) at org.drools.core.reteoo.ReteooBuilder.removeTerminalNode(ReteooBuilder.java:185) at org.drools.core.reteoo.ReteooBuilder.removeRules(ReteooBuilder.java:170) at org.drools.core.impl.KnowledgeBaseImpl.internalRemoveRule(KnowledgeBaseImpl.java:1685) at org.drools.core.impl.KnowledgeBaseImpl.access$200(KnowledgeBaseImpl.java:117) at org.drools.core.impl.KnowledgeBaseImpl$3.run(KnowledgeBaseImpl.java:1658) at org.drools.core.impl.KnowledgeBaseImpl.enqueueModification(KnowledgeBaseImpl.java:720) at org.drools.core.impl.KnowledgeBaseImpl.removeRule(KnowledgeBaseImpl.java:1655) at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.preProcessRules(KnowledgeBuilderImpl.java:1155) at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileRules(KnowledgeBuilderImpl.java:1106) at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.compileAllRules(KnowledgeBuilderImpl.java:989) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildRules(CompositeKnowledgeBuilderImpl.java:260) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.buildPackages(CompositeKnowledgeBuilderImpl.java:121) at org.drools.compiler.builder.impl.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:105) at org.drools.compiler.kie.builder.impl.KieContainerImpl.rebuildAll(KieContainerImpl.java:386) at org.drools.compiler.kie.builder.impl.KieContainerImpl.updateKBase(KieContainerImpl.java:241) at org.drools.compiler.kie.builder.impl.KieContainerImpl.access$000(KieContainerImpl.java:80) at org.drools.compiler.kie.builder.impl.KieContainerImpl$1.run(KieContainerImpl.java:186) at org.drools.core.impl.KnowledgeBaseImpl.enqueueModification(KnowledgeBaseImpl.java:720) at org.drools.compiler.kie.builder.impl.KieContainerImpl.update(KieContainerImpl.java:183) at org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion(KieContainerImpl.java:130) at org.drools.compiler.integrationtests.incrementalcompilation.IncrementalCompilationTest.testRemoveRuleWithNonInitializedPath(IncrementalCompilationTest.java:2832)
- clones
-
RHDM-31 NPE removing a not initialized rule in stream mode
- Closed
- incorporates
-
DROOLS-1177 NPE removing a not initialized rule in stream mode
- Resolved