java.lang.RuntimeException: Cannot find a default KieSession

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When generating a sample Drools project with the Eclipse plugin (6.0.x), there are several issues: * When DroolsBuilder is trying to parse the Sample.drl, it seems to be failing to import the Message class (resulting in 11 errors in the problems view), see screenshot1. Executing the test does seem to work though * When both Sample.drl and Sample.xls are created in the same project, the imports seems to clash, executing the test fails when compiling: java.lang.RuntimeException: Error while creating KieBase[Message [id=1, level=ERROR, path=rules/Sample.drl, line=15, column=0 text=Rule Compilation error The import com.sample.DroolsTest.Message collides with another import statement], Message [id=2, level=ERROR, path=dtables/Sample.xls, line=15, column=0 text=Rule Compilation error The import com.sample.DroolsTest.Message collides with another import statement], Message [id=3, level=ERROR, path=dtables/Sample.xls, line=5, column=0 text=Rule Compilation error The import com.sample.DroolsTest.Message collides with another import statement], Message [id=4, level=ERROR, path=rules/Sample.drl, line=5, column=0 text=Rule Compilation error The import com.sample.DroolsTest.Message collides with another import statement]] at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:170) at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:298) at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:273) at com.sample.DroolsTest.main(DroolsTest.java:17) Isn't this allowed? * When executing DroolsTest, there seems to be a Sysout somewhere in the code base: kmodules: file:/NotBackedUp/jBPM-6.0.0.CR2/jbpm-installer/workspace/drools/target/META-INF/kmodule.xml
    via by Kris Verlaenen,
    • java.lang.RuntimeException: Cannot find a default KieSession at org.drools.compiler.kie.builder.impl.KieContainerImpl.findKieSessionModel(KieContainerImpl.java:555) at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:548) at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:531) at Drools.DroolsMain.kieTest(DroolsMain.java:43) at Drools.DroolsMain.main(DroolsMain.java:52)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    2 more bugmates