Bug 1318911

Summary: [GSS] (6.2.z) fix reteoo intialization via system property
Product: [Retired] JBoss BRMS Platform 6 Reporter: Toshiya Kobayashi <tkobayas>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED EOL QA Contact: Ivo Bek <ibek>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: etirelli, ibek, lpetrovi, mwinkler
Target Milestone: CR1   
Target Release: 6.2.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1318910 Environment:
Last Closed: 2020-03-27 19:07:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1318910    
Bug Blocks: 1327763, 1327765    

Description Toshiya Kobayashi 2016-03-18 06:05:14 UTC
+++ This bug was initially created as a clone of Bug #1318910 +++

Description of problem:

Platform BZ for https://issues.jboss.org/browse/DROOLS-986


If you run Drools with  System.setProperty("drools.ruleEngine", "reteoo"), you will get an NPE.

====
java.lang.NullPointerException
	at org.drools.core.RuleBaseConfiguration.configureReteComponentFactory(RuleBaseConfiguration.java:953)
	at org.drools.core.RuleBaseConfiguration.setPhreakEnabled(RuleBaseConfiguration.java:791)
	at org.drools.core.RuleBaseConfiguration.init(RuleBaseConfiguration.java:495)
	at org.drools.core.RuleBaseConfiguration.init(RuleBaseConfiguration.java:429)
	at org.drools.core.RuleBaseConfiguration.<init>(RuleBaseConfiguration.java:420)
	at org.drools.core.impl.KnowledgeBaseFactoryServiceImpl.newKnowledgeBaseConfiguration(KnowledgeBaseFactoryServiceImpl.java:38)
	at org.kie.internal.KnowledgeBaseFactory.newKnowledgeBaseConfiguration(KnowledgeBaseFactory.java:125)
	at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKnowledgeBaseConfiguration(KieContainerImpl.java:516)
	at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:497)
	at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:440)
	at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:597)
	at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:568)
	at com.sample.DroolsTest.main(DroolsTest.java:19)
====

Steps to Reproduce:

See Unit test in the commit

https://github.com/droolsjbpm/drools/commit/731f00a66b0fbe6591160af588e0bed44d186c83


Actual results:

NullPointerException is thrown

Expected results:

Execute without an Exception

--- Additional comment from Toshiya Kobayashi on 2016-03-18 02:03:04 EDT ---

I confirmed that it is already fixed in 6.4.x branch and product tag sync-6.4.x-2016.03.08. Setting to MODIFIED.

Comment 3 Mario Fusco 2016-03-31 15:14:59 UTC
Cherry-picked to 6.3.x branch with https://github.com/droolsjbpm/drools/commit/54da41132

Comment 4 Ivo Bek 2016-05-04 13:19:01 UTC
Verified in BPM Suite 6.2.3.CR1

The test testUseReteooViaSystemProperty passed.