[jboss-jira] [JBoss JIRA] (DROOLS-1007) ArrayIndexOutOfBoundsException attempting to remove a rule containing a OR

RH Bugzilla Integration (JIRA) issues at jboss.org
Fri Mar 18 10:19:00 EDT 2016


    [ https://issues.jboss.org/browse/DROOLS-1007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13179107#comment-13179107 ] 

RH Bugzilla Integration commented on DROOLS-1007:
-------------------------------------------------

Marek Winkler <mwinkler at redhat.com> changed the Status of [bug 1291749|https://bugzilla.redhat.com/show_bug.cgi?id=1291749] from ON_QA to VERIFIED

> ArrayIndexOutOfBoundsException attempting to remove a rule containing a OR
> --------------------------------------------------------------------------
>
>                 Key: DROOLS-1007
>                 URL: https://issues.jboss.org/browse/DROOLS-1007
>             Project: Drools
>          Issue Type: Bug
>            Reporter: Mario Fusco
>            Assignee: Mario Fusco
>             Fix For: 6.4.0.Beta1
>
>
> At the moment the association between a node and a rule is kept by a Map inside the node having the rule as key. This implementation is not taking count of the fact that the same node could be associated multiple times to the same rule that it is indeed what happens when a rule contains a OR.
> During the removal of such a rule the nodes of the rule are removed from the Rete starting from the RuleTerminalNodes (in this case the rule has more than one RTNs because of the OR). This means that when the first RTN is removed the Join and LIA nodes that are sources for that RTN at any level got completely disassociated from the rule when it is too early. That in the end causes the following exception when the engine tries to remove also the second RTN of that rule
> {code}
> java.lang.ArrayIndexOutOfBoundsException: 1
> 	at org.drools.core.phreak.AddRemoveRule.removeRule(AddRemoveRule.java:171)
> 	at org.drools.core.reteoo.ReteooBuilder.removeTerminalNode(ReteooBuilder.java:173)
> 	at org.drools.core.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:163)
> 	at org.drools.core.impl.KnowledgeBaseImpl.removeRule(KnowledgeBaseImpl.java:1635)
> 	at org.drools.core.impl.KnowledgeBaseImpl.removeRule(KnowledgeBaseImpl.java:1626)
> 	at org.drools.core.impl.KnowledgeBaseImpl.internalRemoveRule(KnowledgeBaseImpl.java:1610)
> 	at org.drools.core.impl.KnowledgeBaseImpl.removeRule(KnowledgeBaseImpl.java:1581)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list