Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-8832

Unable to build jbpm project outside of the workbench when including a kbase from a dependency in the pom

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 7.23.0.Final
    • Business Apps, Workbench
    • None
    • NEW
    • NEW
    • Hide

      To reproduce use the info from: https://bugzilla.redhat.com/show_bug.cgi?id=1108070

      Or create two rules projects. Modify the kmodule.xml for each rule project to specify specific kbases and then in the one project include the other project's kbase. For example
      Parent project kmodule.xml:

      <kmodule xmlns="http://www.drools.org/xsd/kmodule" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <kbase name="parent_process" default="true" eventProcessingMode="stream" equalsBehavior="identity" packages="com.parent.*" includes="child_rules_kbase">
      <ksession name="parent_process" type="stateful" default="true" clockType="realtime"/>
      </kbase>
      </kmodule>

      Child kmodule.xml

      <kmodule xmlns="http://www.drools.org/xsd/kmodule" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <kbase name="child_rules_kbase" default="true" eventProcessingMode="stream" equalsBehavior="identity" packages="com.child.*" >
      <ksession name="child_process" type="stateful" default="true" clockType="realtime"/>
      </kbase>
      </kmodule>

      Next add the GAV of the child project as a dependancy to the parent project.
      Next outside the rules workbench do a "mvn clean install" for the child project and then the same for the parent project. You should get an error like this:

      [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.23.0.Final-redhat-00002:build (default-build) on project parent_process: Execution default-build of goal org.kie:kie-maven-plugin:7.23.0.Final-redhat-00002:build failed: Unable to get KieModule, Errors Existed: Error Messages:
      [ERROR] Message [id=1, kieBase=parent_process, level=ERROR, path=src/main/resources/META-INF/kmodule.xml, line=0, column=0
      [ERROR] text=Unable to build KieBase, could not find include: child_rules_kbase]

      I have also attached a zip file (dummy.zip) with a parent and child project in it. You need to build (mvn clean install) the child project first and then the parent and you will see the error when building the parent.

      Show
      To reproduce use the info from: https://bugzilla.redhat.com/show_bug.cgi?id=1108070 Or create two rules projects. Modify the kmodule.xml for each rule project to specify specific kbases and then in the one project include the other project's kbase. For example Parent project kmodule.xml: <kmodule xmlns="http://www.drools.org/xsd/kmodule" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <kbase name="parent_process" default="true" eventProcessingMode="stream" equalsBehavior="identity" packages="com.parent.*" includes="child_rules_kbase"> <ksession name="parent_process" type="stateful" default="true" clockType="realtime"/> </kbase> </kmodule> Child kmodule.xml <kmodule xmlns="http://www.drools.org/xsd/kmodule" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <kbase name="child_rules_kbase" default="true" eventProcessingMode="stream" equalsBehavior="identity" packages="com.child.*" > <ksession name="child_process" type="stateful" default="true" clockType="realtime"/> </kbase> </kmodule> Next add the GAV of the child project as a dependancy to the parent project. Next outside the rules workbench do a "mvn clean install" for the child project and then the same for the parent project. You should get an error like this: [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.23.0.Final-redhat-00002:build (default-build) on project parent_process: Execution default-build of goal org.kie:kie-maven-plugin:7.23.0.Final-redhat-00002:build failed: Unable to get KieModule, Errors Existed: Error Messages: [ERROR] Message [id=1, kieBase=parent_process, level=ERROR, path=src/main/resources/META-INF/kmodule.xml, line=0, column=0 [ERROR] text=Unable to build KieBase, could not find include: child_rules_kbase] I have also attached a zip file (dummy.zip) with a parent and child project in it. You need to build (mvn clean install) the child project first and then the parent and you will see the error when building the parent.

      The issue is very similar to a previous issue: https://bugzilla.redhat.com/show_bug.cgi?id=1108070

      When building a jbpm project outside the workbench on the commandline and including a kbase in the kmodule.xml file, which is from another rules project, and was added as a dependency in the project pom.xml file, I get the following error:

      [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.23.0.Final-redhat-00002:build (default-build) on project parent_process: Execution default-build of goal org.kie:kie-maven-plugin:7.23.0.Final-redhat-00002:build failed: Unable to get KieModule, Errors Existed: Error Messages:
      [ERROR] Message [id=1, kieBase=parent_process, level=ERROR, path=src/main/resources/META-INF/kmodule.xml, line=0, column=0
      [ERROR] text=Unable to build KieBase, could not find include: child_rules_kbase]

      When building it inside workbench no errors are thrown and during execution, everything is working correctly.

              swiderski.maciej Maciej Swiderski (Inactive)
              bvanderwalt@vizuri.com Ben-Johan van der Walt (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: