While using KIE-CI to fire rules deployed in a remote BRMS server the standalone code throws the exception Cannot find KieModule

Solution Verified - Updated -

Issue

  • As per the following Community documentation [1] , KieModule which is a Maven produced JAR (containing the required rule assets) with a kmodule.xml in it can be loaded from the classpath or dynamically at runtime from a Resource location. While using a standalone Java SE application to fire the rules (packaged inside the KieModule Jar as mentioned earlier) works fine if the Jar containing rules is picked up from classpath using the following API call.
KieServices kieServices = KieServices.Factory.get();
KieContainer kieContainer = kieServices.getKieClasspathContainer();
...

But, if the approach is changed to use the KieScanner [2] so that the rule assets could be accessed from the Jar residing in remote BRMS server, it gives the following exception.

Exception in thread "main" java.lang.RuntimeException: Cannot find KieModule: org.kie.test.sampleApp:remoteProject:2.0.0
...

Code using KIE-CI .

KieServices kieServices = KieServices.Factory.get();
ReleaseId releaseID = kieServices.newReleaseId("org.kie.test.sampleApp", "remoteProject","2.0.0");
KieContainer kieContainer = kieServices.newKieContainer(releaseID);
KieScanner kieScanner = kieServices.newKieScanner(kieContainer);
kieScanner.start(100L);
...

How to fix this issue?

[1] http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/DroolsReleaseNotesChapter.html#d0e496
[2] http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/DroolsReleaseNotesChapter.html#d0e515

Environment

  • Red Hat JBoss BRMS (BRMS)
    • 6.0.0 Beta

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content