| Summary: | DecisionTable added to KnowledgeAgent via change-set throws a NullPointerException | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Alessandro Lazarotti <alazarot> | ||||||||||
| Component: | BRE (Expert, Fusion), Configuration | Assignee: | Nobody <nobody> | ||||||||||
| Status: | VERIFIED --- | QA Contact: | Marek Baluch <mbaluch> | ||||||||||
| Severity: | high | Docs Contact: | |||||||||||
| Priority: | high | ||||||||||||
| Version: | 5.0.2, 5.1.0.ER3, BRMS 5.2.0.GA | CC: | atangrin | ||||||||||
| Target Milestone: | --- | ||||||||||||
| Target Release: | BRMS 5.2.0.GA | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| URL: | http://jira.jboss.org/jira/browse/BRMS-466 | ||||||||||||
| Whiteboard: | |||||||||||||
| 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.
|
Story Points: | --- | ||||||||||
| Clone Of: | Environment: |
JBoss Enterprise BRMS 5.0.2/5.1.0.ER3, JDK 1.6 sun/oracle, Fedora 12
|
|||||||||||
| Last Closed: | Type: | Bug | |||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||
| Documentation: | --- | CRM: | |||||||||||
| Verified Versions: | Category: | --- | |||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
| Attachments: |
|
||||||||||||
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 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.
|
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)