Created attachment 784773 [details] test case (maven project) Description of problem: I have encountered the following issue. Environment : Drools 6.0.0.Beta5 / Stream mode I have the following DRL code: --- global org.test.Context context; declare SimpleFact @role( event ) end rule "Test rule" when $f : SimpleFact( ) not ( Integer() from context.load() ) then System.out.println("Firing 'Test rule' with: " + $f.toString()); end ---- When running this using Drools 6.0.0.Beta2 it works fine. But with 6.0.0.Beta5 and 6.0.0.CR1, I get the exception listed at the bottom of this email. I am running this sample in Stream mode. Hints: the problem disappears if I do one of the following thing : - If I comment out ‘kBaseConf.setOption(EventProcessingOption.STREAM)’ - If I remove the ‘not‘ from the 2nd condition of the DRL - If I remove the ‘declare SimpleFact @role(event) end’ section from the DRL - If I remove the ’from context.load()‘ from the 2nd condition of the DRL So far I haven’t found a workaround, but as it works with BETA2, I am guessing there must be something wrong. I am sending you the Eclipse project so that you can easily reproduce the problem using Maven. Version-Release number of selected component (if applicable): Drools 6.0.0.Beta5 or BRMS 6 Alpha How reproducible: Steps to Reproduce: 1. FOllow use case just described 2. Us ethe attached test case 3. Actual results: Expected results: Additional info:
ava.lang.NullPointerException at org.drools.core.reteoo.BetaNode.<init>(BetaNode.java:167) at org.drools.core.reteoo.NotNode.<init>(NotNode.java:58) at org.drools.core.reteoo.builder.GroupElementBuilder$NotBuilder.build(GroupElementBuilder.java:258) at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:70) at org.drools.core.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:112) at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:70) at org.drools.core.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:164) at org.drools.core.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:136) at org.drools.core.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:112) at org.drools.core.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:433) at org.drools.core.common.AbstractRuleBase.addRule(AbstractRuleBase.java:924) at org.drools.core.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:600) at org.drools.core.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:460) at org.drools.core.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:152) at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:132) at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieBase(KieContainerImpl.java:103) at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieBase(KieContainerImpl.java:98) at org.test.DroolsTest.initSession(DroolsTest.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197
Fixed by https://github.com/droolsjbpm/drools/commit/25edeb4a6
Verified on BRMS 6.0.0.ER3.