Hide Forgot
Date of First Response: 2009-09-10 01:37:38 securitylevel_name: Public 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.
Link: Added: This issue is related to JBRULES-2090
Fix in place.
For documenting this in the Release Notes, can you please confirm the following and fill in the missing information. Dot point explanations are fine: The CAUSE (what was actually broken) * CONSEQUENCES of the bug (how it impacts users.) * The StatelessKnowledgeSessions created by the Knowledge Agent were, when used in pipelines, causing null pointer exceptions. The FIX (what was changed to eliminate this bug) and * The Agent is now checked to ensure that the latest version of the rulebase has been set. RESULTS of the fix (what now happens for users.) *
added to the 5.0.CP01 release notes as resolved: JBRULES-2090 StatelessKnowledgeSessions created by KnowledgeAgent could throw a Null Pointer Exception if used in a pipeline. This because KnowledgeAgent creates the StatelessKnowlegeSession with a null ruleBase. The Agent is now checked to ensure that the latest version of the rule base has been set.