StatelessKnowledgeSessions created by KnowledgeAgent causes NullPointerException when used
in a pipeline
--------------------------------------------------------------------------------------------------------
Key: JBRULES-2090
URL:
https://jira.jboss.org/jira/browse/JBRULES-2090
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: David Zeigler
Assignee: Mark Proctor
Attachments: KnowledgeAgentTest.java.patch
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