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

KieContainer creation fails without helpful error message if kmodule.xml is invalid

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.6.0.GA
    • 7.4.1.GA
    • BRE
    • Release Notes
    • CR1
    • +
    • Hide

      Remove any attributes from the kbase declaration which are not defined in the kmodule.xsd

      Show
      Remove any attributes from the kbase declaration which are not defined in the kmodule.xsd
      • Deploy a container with a kmodule.xml file containing additional attributes
      • See README.txt in attached zip file for detailed steps
    • 2019 Week 41-43 (from Okt 7)

    Description

      When creating a kjar with RHDM 7.5.0 or a community version >7.25.0, deployment of this kjar fails in RDHM 7.4.1:

      10:31:13,375 ERROR [org.kie.server.services.impl.KieServerImpl] (default task-3) Error creating container 'test' for module 'com.redhat.support:kjar-test:1.0': java.lang.RuntimeException: Cannot find KieModule: com.redhat.support:kjar-test:1.0
      	at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:186)
      	at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:176)
      

      The root cause of the issue is that the kmodule.xml generated with a newer versions supports the additional sequential attribute for the kbase defintion due to DROOLS-4335:

        <kbase name="defaultKieBase" default="true" ... sequential="false">
      

      While it is arguable if we need to provide forward compatibility, we should at least provide a clear error message about the underlying marshalling issue, allowing users to quickly identify the issue.

      Alternatively - and if possible - the parser could just ignore the additional attribute.

      Attachments

        Issue Links

          Activity

            People

              mfusco@redhat.com Mario Fusco
              rhn-support-mputz Martin Weiler (Inactive)
              Tibor Zimányi Tibor Zimányi
              Tibor Zimányi Tibor Zimányi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: