Bug 995408 - Regression bug on Drools in stream mode between Drools 6 beta 2 and BRMS 6 Alpha
Summary: Regression bug on Drools in stream mode between Drools 6 beta 2 and BRMS 6 Alpha
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ER3
: 6.0.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-09 09:35 UTC by olivier
Modified: 2014-08-06 20:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:18:23 UTC
Type: Bug
Embargoed:


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

Description olivier 2013-08-09 09:35:57 UTC
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 12:49:48 UTC
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 12:15:52 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/25edeb4a6

Comment 4 Marek Winkler 2013-09-24 16:19:15 UTC
Verified on BRMS 6.0.0.ER3.


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