I have defined a set of rules using DSL and corresponding rules in Drools Guvnor (Rules Engine) and I have tested the same using a standalone code which is working fine.
But when I tried invoking the same from a web service by passing the request parameters and I had the business logic in the skeleton by including this guvnor project as a JAR and used the method in it for my implementation, I was able to get the desired output out of the Guvnor rule engine in the skeleton and i had set the response in the response class from it and returning back the response to the client, while doing so Im getting a NullPointerException.
I had used Axis 2 codegen and service archiver plugins to generate the skeleton and stubs out of the WSDL and did the above logic and i had deployed the service using both axis2 1.4.1 and 1.5.1 as well.
Below is the exception stack I got in server side,
ERROR - AxisServlet.doPost(172) | java.lang.NullPointerException at org.apache.axis2.clustering.context.DefaultContextManager.updateContexts(Defaul tContextManager.java:81) at org.apache.axis2.clustering.context.Replicator.replicate(Replicator.java:81) at org.apache.axis2.receivers.AbstractMessageReceiver.replicateState(AbstractMessa geReceiver.java:71) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(Abs tractInOutMessageReceiver.java:41) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageRecei ver.java:100) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPT ransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10 9) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:595)
And the below is the exception stack in client side,
org.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisO peration.java:370) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.j ava:416) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOper ation.java:228) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at org.tempuri.Service1Stub.CheckEntitlement(Service1Stub.java:740) at ws.client.testClient.main(testClient.java:73)
If any one has faced similar issue and fixed the same, please help me out it resolving the same or any pointers for fixing this issue would be of greater helpful.