Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1104

ClassCastException at BuildUtils.mergeNodes with two rules having identical constraints

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.5.1.GA
    • 7.4.1.GA
    • BRE
    • None
    • 2019 Week 41-43 (from Okt 7)

      Building a rule base where two rules have identical constraints fails with a ClassCastException:

      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)
      

              mfusco@redhat.com Mario Fusco
              rhn-support-mputz Martin Weiler (Inactive)
              Daniel Rosa Daniel Rosa
              Daniel Rosa Daniel Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: