Bug 995408 - Regression bug on Drools in stream mode between Drools 6 beta 2 and BRMS 6 Alpha
Regression bug on Drools in stream mode between Drools 6 beta 2 and BRMS 6 Alpha
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
6.0.0
x86_64 Linux
unspecified Severity urgent
: ER3
: 6.0.0
Assigned To: Mario Fusco
Marek Winkler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-09 05:35 EDT by olivier
Modified: 2014-08-06 16:18 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:18:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test case (maven project) (9.57 KB, application/x-zip-compressed)
2013-08-09 05:35 EDT, olivier
no flags Details

  None (edit)
Description olivier 2013-08-09 05:35:57 EDT
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:
Comment 2 olivier 2013-08-09 08:49:48 EDT
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
Comment 3 Mario Fusco 2013-08-21 08:15:52 EDT
Fixed by https://github.com/droolsjbpm/drools/commit/25edeb4a6
Comment 4 Marek Winkler 2013-09-24 12:19:15 EDT
Verified on BRMS 6.0.0.ER3.

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