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

KieContainer.verify(kBaseName) throws NPE when kBaseName is wrong

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 7.8.0.Final
    • None
    • 5
      1. Download the droolstestjar.zip maven project
      2. build the project and run the DroolsUtilsTest junit
    • NEW
    • NEW

      This snippet:

      		// Using a wrong KB name causes a NPE
      		KieContainer kc = DroolsUtils.getAndVerifyKieContainer("WrongKBName");
      

      throws a NPE with thr following stacktrace

      testSomeMethod(org.mydomain.drooltestjar.DroolsUtilsTest)  Time elapsed: 1.065 sec  <<< ERROR!
      java.lang.NullPointerException
      	at org.drools.compiler.kie.builder.impl.AbstractKieProject.buildKnowledgePackages(AbstractKieProject.java:207)
      	at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:80)
      	at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:68)
      	at org.drools.compiler.kie.builder.impl.KieContainerImpl.verify(KieContainerImpl.java:343)
      ...
      ...
      

              lmolteni@redhat.com Luca Molteni
              lucabur_jira Luca Buraggi (Inactive)
              Tibor Zimányi Tibor Zimányi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: