<div dir="ltr">Try upgrading to 6.1.CR2.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 24, 2014 at 1:23 AM, LearningDrool <span dir="ltr">&lt;<a href="mailto:apeksha.gupta@asurion.com" target="_blank">apeksha.gupta@asurion.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am getting the same error as described below. I was able to run and fire<br>
rules using a standalone application in my project but when I try to call<br>
the same rules through a dynamic web app, it throws the below errors :<br>
<br>
Code :<br>
<br>
KieServices ks = KieServices.Factory.get();<br>
KieContainer kc = ks.getKieClasspathContainer();<br>
StatelessKieSession ksession = kc.newStatelessKieSession(&quot;TestDRL&quot;);<br>
ksession.addEventListener( new DebugAgendaEventListener() );<br>
 ksession.execute()<br>
<br>
The Kmodule File is defined as below and is placed in the<br>
/Resources/META-INF folder<br>
<br>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>
&lt;kmodule xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br>
             xmlns=&quot;<a href="http://jboss.org/kie/6.0.0/kmodule" target="_blank">http://jboss.org/kie/6.0.0/kmodule</a>&quot;<br>
xmlns:Kie=&quot;<a href="http://drools.org/schema/drools-spring" target="_blank">http://drools.org/schema/drools-spring</a>&quot;&gt;<br>
    &lt;kbase name=&quot;MainTest&quot; equalsBehavior=&quot;equality&quot;<br>
packages=&quot;com.test.web.actions.bard&quot; &gt;<br>
            &lt;ksession name=&quot;TestDRL&quot; type=&quot;stateless&quot; /&gt;<br>
        &lt;/kbase&gt;<br>
<br>
&lt;/kmodule&gt;<br>
<br>
<br>
Error :<br>
<br>
0:05:58.692 [http-bio-8443-exec-4] INFO  o.d.c.k.b.impl.ClasspathKieProject<br>
- Found kmodule:<br>
jar:file:/C:/test/web/actions/bard/WEB-INF/lib/bard.jar!/META-INF/kmodule.xml<br>
10:05:58.706 [http-bio-8443-exec-4] DEBUG o.d.c.k.b.impl.ClasspathKieProject<br>
- KieModule URL type=jar url=/C:/test/web/actions/bard/WEB-INF/lib/bard.jar<br>
10:06:05.834 [http-bio-8443-exec-4] ERROR o.d.c.k.b.impl.ClasspathKieProject<br>
<div class="">- Unable to load pom.properties<br>
</div>from/C:/test/web/actions/bard/WEB-INF/lib/bard.jar<br>
null<br>
10:06:05.845 [http-bio-8443-exec-4] ERROR o.d.c.k.b.impl.ClasspathKieProject<br>
<div class="">- Unable to load pom.properties<br>
</div>from/C:/test/web/actions/bard/WEB-INF/lib/bard.jar<br>
10:06:05.856 [http-bio-8443-exec-4] ERROR o.d.c.k.b.impl.ClasspathKieProject<br>
<div class="">- Unable to build index of kmodule.xml<br>
</div>url=jar:file:/C:/test/web/actions/bard/WEB-INF/lib/bard.jar!/META-INF/kmodule.xml<br>
null<br>
<br>
<br>
<br>
<br>
Also I was able to call the DRL file using the below code in my project:<br>
<br>
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();<br>
Resource ruleFile =<br>
ResourceFactory.newUrlResource(getClass().getClassLoader().getResource(&quot;test1.drl&quot;));<br>
kbuilder.add(ruleFile, ResourceType.DRL);<br>
KnowledgeBase kbase = kbuilder.newKnowledgeBase();<br>
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());<br>
<br>
<br>
I had placed the test1.drl file in the Tomcat folder<br>
<br>
Why are the Ksessions not being loaded when using the Kmodule.xml. Any<br>
ideas?<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Unable-to-build-index-of-kmodule-xml-from-Kie-project-jar-tp4030253p4030463.html" target="_blank">http://drools.46999.n3.nabble.com/Unable-to-build-index-of-kmodule-xml-from-Kie-project-jar-tp4030253p4030463.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br></div>