Hi all,

I tried to run Drools in a webapp, it runs smoothly when I only load simple rules.
The spec I have:
AP server --> WASCE2.1 (or geronimo 2.1)
Spring --> 3.0.5
Drools --> 5.2 Fianl
JVM --> IBM SDK 1.6

When I tried to use ruleflow --> execute drl in rf, I got NullPointerException with the following trace:

exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:806)

root cause

java.lang.NullPointerException
    org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:516)
    org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:556)
    org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
    net.viralpatel.drools.core.DroolsCore.createKnowledgeBase(DroolsCore.java:17)
    net.viralpatel.contact.controller.ContactController.listContacts(ContactController.java:41)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:59)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:39)
    java.lang.reflect.Method.invoke(Method.java:612)
    org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:806)


net.viralpatel.drools.core.DroolsCore.createKnowledgeBase(DroolsCore.java:17) is the following line:
builder.add(ResourceFactory.newClassPathResource("basicFlow.rf"), ResourceType.DRF);

Any advise is appreciated.


This is a UTF-8 formatted mail
-----------------------------------------------
James C.-C.Yu