Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-841

No compilation failure is raised when using an unknown window name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.3.0.CR1
    • None
    • None
    • None
    • NEW
    • NEW

      When using an unknown window name no compilation failure is raised. Subsequently, when trying to create a KieBase out of the compiled rules, the following NPE is raised:

      java.lang.NullPointerException
      	at org.drools.core.reteoo.builder.WindowReferenceBuilder.build(WindowReferenceBuilder.java:40)
      	at org.drools.core.reteoo.builder.PatternBuilder.attachPattern(PatternBuilder.java:117)
      	at org.drools.core.reteoo.builder.PatternBuilder.build(PatternBuilder.java:78)
      	at org.drools.core.reteoo.builder.AccumulateBuilder.build(AccumulateBuilder.java:67)
      	at org.drools.core.reteoo.builder.PatternBuilder.attachPattern(PatternBuilder.java:117)
      	at org.drools.core.reteoo.builder.PatternBuilder.build(PatternBuilder.java:78)
      	at org.drools.core.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:108)
      	at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
      	at org.drools.core.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:164)
      	at org.drools.core.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:136)
      	at org.drools.core.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:102)
      	at org.drools.core.impl.KnowledgeBaseImpl.addRule(KnowledgeBaseImpl.java:1521)
      	at org.drools.core.impl.KnowledgeBaseImpl.addRule(KnowledgeBaseImpl.java:1501)
      	at org.drools.core.impl.KnowledgeBaseImpl.internalAddPackages(KnowledgeBaseImpl.java:868)
      	at org.drools.core.impl.KnowledgeBaseImpl.addPackages(KnowledgeBaseImpl.java:723)
      	at org.drools.core.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:277)
      	at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:493)
      	at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieBase(KieContainerImpl.java:452)
      	at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieBase(KieContainerImpl.java:447)
      	at org.kie.internal.utils.KieHelper.build(KieHelper.java:77)
      	at org.drools.compiler.integrationtests.LengthSlidingWindowTest.checkPrice(LengthSlidingWindowTest.java:96)
      	at org.drools.compiler.integrationtests.LengthSlidingWindowTest.testSlidingWindowWithDeclaration(LengthSlidingWindowTest.java:89)
      

              mfusco@redhat.com Mario Fusco
              mfusco@redhat.com Mario Fusco
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: