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