BRMS 6.2 throws NullPointerException when configuring RETEOO via system property
Issue
- When we set a reteoo algorithm, we got Nullpointer exception. It worked on 6.1.0 correctly. It seems this behavior have relevant with https://issues.jboss.org/browse/DROOLS-986 .
public static final void main(String[] args) {
try {
System.setProperty("drools.ruleEngine", "reteoo");
KieServices ks = KieServices.Factory.get();
KieContainer kContainer = ks.getKieClasspathContainer();
KieSession kSession = kContainer.newKieSession("ksession-rules");
Console Error
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.DecisionTableTest.main(DecisionTableTest.java:20)
Environment
- Red Hat JBoss BRMS
- 6.2.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
