[jboss-jira] [JBoss JIRA] Created: (JBRULES-2194) CLONE -StatelessKnowledgeSessions created by KnowledgeAgent causes NullPointerException when used in a pipeline

Neil Wallace (JIRA) jira-events at lists.jboss.org
Tue Jul 7 11:29:52 EDT 2009


CLONE -StatelessKnowledgeSessions created by KnowledgeAgent causes NullPointerException when used in a pipeline
---------------------------------------------------------------------------------------------------------------

                 Key: JBRULES-2194
                 URL: https://jira.jboss.org/jira/browse/JBRULES-2194
             Project: JBoss Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-compiler
         Environment: 5.0.1.SNAPSHOT for May 12, 2009
            Reporter: Neil Wallace
            Assignee: Mark Proctor
             Fix For: 5.0.1.FINAL


This issue is related to this thread on the user-list:  http://www.mail-archive.com/rules-users@lists.jboss.org/msg08770.html

I'm getting a NullPointerException when I insert an object into
the pipeline using 5.0.1.SNAPSHOT from May 12, 2009:
java.lang.NullPointerException
        at 
org.drools.runtime.pipeline.impl.StatelessKnowledgeSessionPipelineImpl.insert(StatelessKnowledgeSessionPipelineImpl.java:24)

It looks like StatelessKnowledgeSession's ruleBase is null when created by the KnowledgeAgent, which poses a problem since StatelessKnowledgeSessionPipelineImpl invokes getRootClassLoader() on the session's ruleBase.

Here's what I'm doing:
StatelessKnowledgeSession ksession = kagent.newStatelessKnowledgeSession();
Pipeline pipeline =
PipelineFactory.newStatelessKnowledgeSessionPipeline(ksession);
pipeline.setReceiver(messageTransformer);
pipeline.insert(message);  // NPE here

I'll attach a patch to KnowledgeAgentTest containing a failing test case.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list