Steps to Reproduce: Using a changeset.xml like the attached here, load using: private static KnowledgeBase readKnowledgeBase() throws Exception { final KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("kagent"); kagent.applyChangeSet(ResourceFactory.newClassPathResource("ChangeSet.xml")); KnowledgeBase kbase = kagent.getKnowledgeBase(); return kbase; } securitylevel_name: Public When adding a change-set which contains a decision table to a KnowledgeAgent, is throws the exception: Exception in thread "main" java.lang.NullPointerException at org.drools.decisiontable.DecisionTableProviderImpl.compileStream(DecisionTableProviderImpl.java:26) at org.drools.decisiontable.DecisionTableProviderImpl.loadFromInputStream(DecisionTableProviderImpl.java:19) at org.drools.compiler.DecisionTableFactory.loadFromInputStream(DecisionTableFactory.java:16) at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:508) at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25) at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:386) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:120) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:109) at org.drools.bug.AgentDecisionTableBug.main(AgentDecisionTableBug.java:12)
Attachment: Added: ChangeSet.xml
Link: Added: This issue is related to JBRULES-2230
I tested the changes made by Michael Neal in Jira https://jira.jboss.org/browse/JBRULES-2230 and it's works.
Patch based in tag BRMS-5.0.2-GA
Attachment: Added: KnowledgeAgentImpl.java.patch
Seeing the same issue with the attached test and the 5.2 DEV2 build.
Attachment: Added: SimpleDrools466.zip
Tested with 5.2.x branch and this error no longer happens. Used the test provided in https://issues.jboss.org/browse/JBRULES-2230.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: https://bugzilla.redhat.com/show_bug.cgi?id=724520 Decision table configuration was not being parsed to the overloaded KnowledgeBuilderImpl.add method resulting in a NullPointerException. This bug has been resolved and the NullPointerException is no longer thrown.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,3 +1 @@ -https://bugzilla.redhat.com/show_bug.cgi?id=724520 - Decision table configuration was not being parsed to the overloaded KnowledgeBuilderImpl.add method resulting in a NullPointerException. This bug has been resolved and the NullPointerException is no longer thrown.
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.