Bug 1199201 - NPE when incremental compilation removes a rule in stream mode
Summary: NPE when incremental compilation removes a rule in stream mode
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: CR1
: 6.1.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-05 15:52 UTC by Mario Fusco
Modified: 2020-03-27 18:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 18:36:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker DROOLS-731 0 Major Resolved In a catch22 using a NOT constraint in rules shared by multiple facts 2015-12-28 08:55:40 UTC

Description Mario Fusco 2015-03-05 15:52:37 UTC
When in stream mode a rule is removed by an incremental compilation, the right tuples in the stream queues of the memories of the correspondingly removed beta nodes don't get unlinked. This causes the following NPE when you try to programmatically remove from the session the fact to which one of those right tuple was referring to:

java.lang.NullPointerException
	at org.drools.core.reteoo.NotNode.doDeleteRightTuple(NotNode.java:184)
	at org.drools.core.reteoo.NotNode.retractRightTuple(NotNode.java:172)
	at org.drools.core.reteoo.ObjectTypeNode.doRetractObject(ObjectTypeNode.java:347)
	at org.drools.core.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:339)
	at org.drools.core.reteoo.EntryPointNode.retractObject(EntryPointNode.java:392)
	at org.drools.core.common.NamedEntryPoint.delete(NamedEntryPoint.java:556)
	at org.drools.core.common.NamedEntryPoint.delete(NamedEntryPoint.java:519)
	at org.drools.core.impl.StatefulKnowledgeSessionImpl.delete(StatefulKnowledgeSessionImpl.java:1530)
	at org.drools.core.impl.StatefulKnowledgeSessionImpl.delete(StatefulKnowledgeSessionImpl.java:1521)

Comment 1 Mario Fusco 2015-03-05 15:53:28 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/730120030

Comment 3 Mario Fusco 2015-03-10 18:44:02 UTC
Cherry-picked to 6.2.x branch with https://github.com/droolsjbpm/drools/commit/64b0db977

Comment 4 Marek Winkler 2015-03-26 15:39:05 UTC
Verified in BRMS 6.1.0 CR1.

Comment 5 JBoss JIRA Server 2015-07-01 18:12:07 UTC
Mario Fusco <mario.fusco> updated the status of jira DROOLS-731 to Resolved


Note You need to log in before you can comment on or make changes to this bug.