Bug 724520 (BRMS-466) - DecisionTable added to KnowledgeAgent via change-set throws a NullPointerException
Summary: DecisionTable added to KnowledgeAgent via change-set throws a NullPointerExce...
Keywords:
Status: VERIFIED
Alias: BRMS-466
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion), Configuration
Version: 5.0.2,5.1.0.ER3,BRMS 5.2.0.GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: BRMS 5.2.0.GA
Assignee: Nobody
QA Contact: Marek Baluch
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-26 19:14 UTC by Alessandro Lazarotti
Modified: 2021-04-09 12:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
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.
Clone Of:
Environment:
JBoss Enterprise BRMS 5.0.2/5.1.0.ER3, JDK 1.6 sun/oracle, Fedora 12
Last Closed:
Type: Bug


Attachments (Terms of Use)
ChangeSet.xml (485 bytes, text/xml)
2010-11-26 19:16 UTC, Alessandro Lazarotti
no flags Details
KnowledgeAgentImpl.java.patch (884 bytes, text/x-patch)
2010-11-26 19:58 UTC, Alessandro Lazarotti
no flags Details
SimpleDrools466.zip (16.87 KB, application/zip)
2011-07-18 17:51 UTC, Len DiMaggio
no flags Details
SimpleDrools466.zip (16.87 KB, application/zip)
2011-07-18 18:35 UTC, Len DiMaggio
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker BRMS-466 0 Major Closed DecisionTable added to KnowledgeAgent via change-set throws a NullPointerException 2014-02-27 07:58:39 UTC

Description Alessandro Lazarotti 2010-11-26 19:14:20 UTC
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)

Comment 1 Alessandro Lazarotti 2010-11-26 19:16:41 UTC
Attachment: Added: ChangeSet.xml


Comment 2 Alessandro Lazarotti 2010-11-26 19:17:39 UTC
Link: Added: This issue is related to JBRULES-2230


Comment 3 Alessandro Lazarotti 2010-11-26 19:23:01 UTC
I tested the changes made by Michael Neal in Jira https://jira.jboss.org/browse/JBRULES-2230 and it's works.

Comment 4 Alessandro Lazarotti 2010-11-26 19:58:48 UTC
Patch based in tag BRMS-5.0.2-GA

Comment 5 Alessandro Lazarotti 2010-11-26 19:58:48 UTC
Attachment: Added: KnowledgeAgentImpl.java.patch


Comment 6 Len DiMaggio 2011-07-18 17:51:46 UTC
Seeing the same issue with the attached test and the 5.2 DEV2 build.

Comment 7 Len DiMaggio 2011-07-18 17:51:46 UTC
Attachment: Added: SimpleDrools466.zip


Comment 8 Len DiMaggio 2011-07-18 18:35:36 UTC
Attachment: Added: SimpleDrools466.zip


Comment 9 Tihomir Surdilovic 2011-08-25 01:22:21 UTC
Tested with 5.2.x branch and this error no longer happens. Used the test provided in https://issues.jboss.org/browse/JBRULES-2230.

Comment 10 lcarlon 2011-08-25 05:11:01 UTC
    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.

Comment 11 lcarlon 2011-09-14 04:28:09 UTC
    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.


Note You need to log in before you can comment on or make changes to this bug.