[jboss-jira] [JBoss JIRA] (DROOLS-4580) ClassCastException at BuildUtils.mergeNodes with two rules having identical constraints

Mario Fusco (Jira) issues at jboss.org
Tue Oct 1 05:45:00 EDT 2019


     [ https://issues.jboss.org/browse/DROOLS-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Fusco updated DROOLS-4580:
--------------------------------
    Sprint: 2019 Week 38-40 (from Sep 16)


> ClassCastException at BuildUtils.mergeNodes with two rules having identical constraints
> ---------------------------------------------------------------------------------------
>
>                 Key: DROOLS-4580
>                 URL: https://issues.jboss.org/browse/DROOLS-4580
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine
>    Affects Versions: 7.27.0.Final
>            Reporter: Martin Weiler
>            Assignee: Mario Fusco
>            Priority: Major
>
> Building a rule base where two rules have identical constraints fails with a ClassCastException:
> {noformat}
> java.lang.ClassCastException: org.drools.core.rule.constraint.EvaluatorConstraint cannot be cast to org.drools.core.rule.constraint.MvelConstraint
> 	at org.drools.core.reteoo.builder.BuildUtils.mergeNodes(BuildUtils.java:176)
> 	at org.drools.core.reteoo.builder.BuildUtils.attachNode(BuildUtils.java:152)
> 	at org.drools.core.reteoo.builder.GroupElementBuilder$AndBuilder.buildJoinNode(GroupElementBuilder.java:143)
> 	at org.drools.core.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:110)
> 	at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
> 	at org.drools.core.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:167)
> 	at org.drools.core.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:139)
> 	at org.drools.core.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:110)
> 	at org.drools.core.impl.KnowledgeBaseImpl.internalAddRule(KnowledgeBaseImpl.java:1523)
> 	at org.drools.core.impl.KnowledgeBaseImpl.internalAddPackages(KnowledgeBaseImpl.java:913)
> 	at org.drools.core.impl.KnowledgeBaseImpl.lambda$addPackages$2(KnowledgeBaseImpl.java:715)
> 	at org.drools.core.impl.KnowledgeBaseImpl.enqueueModification(KnowledgeBaseImpl.java:732)
> 	at org.drools.core.impl.KnowledgeBaseImpl.addPackages(KnowledgeBaseImpl.java:715)
> 	at org.drools.compiler.kie.builder.impl.AbstractKieModule.createKieBase(AbstractKieModule.java:215)
> 	at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:406)
> 	at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieBase(KieContainerImpl.java:396)
> 	at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieBase(KieContainerImpl.java:391)
> 	at org.kie.internal.utils.KieHelper.build(KieHelper.java:80)
> 	at org.drools.compiler.integrationtests.ExpirationTest.testEventSameContraint(ExpirationTest.java:595)
> {noformat}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list