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

    Details

    • Type: Bug
    • Status: Verified (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.4.1.GA
    • Fix Version/s: 7.6.0.GA
    • Component/s: BRE
    • Labels:
    • Target Release:
    • Fix Build:
      CR1
    • Steps to Reproduce:
      • Deploy a container with a kmodule.xml file containing additional attributes
      • See README.txt in attached zip file for detailed steps
    • Workaround Description:
      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
    • Affects:
      Release Notes
    • Sprint:
      2019 Week 41-43 (from Okt 7)
    • QE Test Coverage:
      +

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mfusco Mario Fusco
                  Reporter:
                  mputz Martin Weiler
                  Tester:
                  Tibor Zimanyi
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: