title: Drools - frequent exceptions in StatelessKnowledgeSession
body: <p>We are using the Drools Rules Engine with Jboss EAP 6.2. When running under load (only maybe 4-5 new sets of facts being inserted) we frequently see the following stacktrace: If the same data is reinserted then generally no error occurs</p>
  
  <p>Stacktrace:</p>
  
  <pre><code>java.lang.NullPointerException
          at org.drools.core.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:344)
  [drools-core-6.1.0.Final.jar:6.1.0.Final]
          at org.kie.camel.component.KieExecuteProducer.process(KieExecuteProducer.java:96)
  [kie-camel-6.1.0.Final.jar:6.1.0.Final]
          at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.processor.Pipeline.process(Pipeline.java:60)
  [camel-core-2.12.2.jar:2.12.2]
          at org.kie.camel.component.KiePolicy$KieProcess.process(KiePolicy.java:330)
  [kie-camel-6.1.0.Final.jar:6.1.0.Final]
          at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
  [camel-core-2.12.2.jar:2.12.2]
          at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.syncInvoke(CxfRsInvoker.java:130)
  [camel-cxf-2.12.2.jar:2.12.2]
          at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:60)
  [camel-cxf-2.12.2.jar:2.12.2]
          at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:104)
  [cxf-api-2.7.11.jar:2.7.11]
          at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:204)
  [cxf-bundle-jaxrs-2.7.11.jar:2.7.11]
          at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:101)
  [cxf-bundle-jaxrs-2.7.11.jar:2.7.11]
          at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
  [cxf-api-2.7.11.jar:2.7.11]
          at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)
  [cxf-api-2.7.11.jar:2.7.11]
          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
  [cxf-api-2.7.11.jar:2.7.11]
          at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
  [cxf-api-2.7.11.jar:2.7.11]
          at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:241)
  [cxf-bundle-jaxrs-2.7.11.jar:2.7.11]
          at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248)
  [cxf-bundle-jaxrs-2.7.11.jar:2.7.11]
          at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:222)
  [cxf-bundle-jaxrs-2.7.11.jar:2.7.11]
          at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153)
  [cxf-bundle-jaxrs-2.7.11.jar:2.7.11]
          at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)
  [cxf-bundle-jaxrs-2.7.11.jar:2.7.11]
          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
  [cxf-bundle-jaxrs-2.7.11.jar:2.7.11]
          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:206)
  [cxf-bundle-jaxrs-2.7.11.jar:2.7.11]
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
  [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
  [cxf-bundle-jaxrs-2.7.11.jar:2.7.11]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
  [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
  [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
  [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
  [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
  [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
  [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
  [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
  [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
  [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
  [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
  [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
  </code></pre>
  
  <p>Any help greatly appreciated</p>