Error Cannot find a default KieSession when run in JBOSS EAP

1,416 views
Skip to first unread message

Jay Mann

unread,
Jun 24, 2015, 12:35:28 PM6/24/15
to drools...@googlegroups.com
Hi,

I have a EJB jar that fires some drools rules.  The jar has kmodule.xml inside the META-INF folder.  This jar is packed inside an EAR that that is deployed to JBOSS EAP 6.3.
The rules run fine during unit test, but once deployed to JBOSS I get the follwoing error:

12:25:56,281 ERROR [stderr] (default-threads - 16) java.lang.RuntimeException: Cannot find a default KieSession

   12:25:56,282 ERROR [stderr] (default-threads - 16)     at org.drools.compiler.kie.builder.impl.KieContainerImpl.findKieSessionModel(KieContainerImpl.java:500)

   12:25:56,283 ERROR [stderr] (default-threads - 16)     at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:493)

   12:25:56,284 ERROR [stderr] (default-threads - 16)     at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:476)



Is there some other place we need to put the kmodule.xml for EARs?

Tried with Drools 6.2 final and 6.3.0.Beta1

Contents of kmodule.xml

<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"></kmodule>

Thanks.

Jay Mann

unread,
Jun 24, 2015, 3:11:40 PM6/24/15
to drools...@googlegroups.com
So it looks like it's failing when it's trying to look for pom.properties inside the jar that is inside the EAR.  I looked at the code and it's trying to unzip the jar by calling a file Open method on this path which is failing:

java.io.FileNotFoundException: E:\jay\tools\jboss-eap-6.3\standalone\deployments\Test-listener-ear.ear\Test-listener-ejb.jar (Access Denied)

Because it's a folder (Jboss already expanded it) so you can't call open on a folder...

And then finally you call zipFile.close() but only catch IOException which throws a nullpointerException since zipFile doesn't exist which hoses the whole damn thing.
Reply all
Reply to author
Forward
0 new messages