I am not sure if this is a design feature or not but I have found that it is impossible to create a BRMS project outside of a Maven structure (and by that I mean the presence of a pom.xml in the CLASSPATH). If this is intentional and the BRMS engine (and by extension the BPMS Engine) shouldn't be used outside a MAVEN structure then we should document this (and yes, please go ahead and reassign this bug to me :)). Bug Details: I have tried to load a KContainer and start a KSession using this code in an independent java file (outside of an IDE and using a text editor). import org.kie.api.KieServices; import org.kie.api.runtime.KieContainer; import org.kie.api.runtime.KieSession; public class MyFirstRule { public static void main(String args[]) { KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.getKieClasspathContainer(); KieSession kSession = kContainer.newKieSession(); } } I have then created an empty kmodule.xml: <?xml version="1.0" encoding="UTF-8"?> <kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"/> and put it in the following folder: ./META-INF I then compiled it using: javac -cp .:./brms-files/jboss-brms-engine/* MyFirstRule.java The jboss-brms-engine folder contains all the jar files provided by the jboss-generic-deployable. Compilation is successful but running it using the following command: java -classpath .:./brms-files/jboss-brms-engine/* MyFirstRule gives the following error: Exception in thread "main" java.lang.RuntimeException: Cannot find a default KieSession at org.drools.compiler.kie.builder.impl.KieContainerImpl.findKieSessionModel(KieContainerImpl.java:450) at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:443) at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:426) at MyFirstRule.main(MyFirstRule.java:10) The error is misdirected - the actual error comes from the inability by the engine to find a pom.xml. In the above code, when the KieServices calls the method getKieClasspathContainer() - it eventually calls the fetchKModule(URL url, String fixedURL) method in ClasspathKieProject class. This is where the system assumes that there will be a POM file present. Since this is a non Maven project, a POM file is not found, and when the following call is made in this method, exceptions occur but are simply logged and not propagated. This causes the system to assume that loading of POM properties worked when it didn't. String pomProperties = getPomProperties( fixedURL ); The result is that the original code fails with a different error from what actually occurred. The actual error is that the system can't find a POM file, but the error that is reported is that no default ksession was found. I believe this should be fixed by either: a) fixing the code to remove the reliance on the presence of a POM file (and by extension enabling non Maven projects to be built using the BRMS engine). b) declaring it in documentation that BRMS/BPMS is not supported on non Maven projects. If you choose b, please change the component of this bug to Documentation so that we can cover it for an async-release.
This issue has been already fixed on master/6.1.x with this commit https://github.com/droolsjbpm/drools/commit/1fb4c12d133e576dd9669406ac5c238fcb3cf8a0
Verified on BRMS 6.1.0.DR3.