[
https://issues.jboss.org/browse/DROOLS-78?page=com.atlassian.jira.plugin....
]
Davide Sottara commented on DROOLS-78:
--------------------------------------
I tried to run the test case you provided after the patch and I don't get any
exception
NullPointerException in windows eviction
----------------------------------------
Key: DROOLS-78
URL:
https://issues.jboss.org/browse/DROOLS-78
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 5.5.0.Final
Reporter: Radai Rosenblatt
Assignee: Mark Proctor
Priority: Blocker
Attachments: droolsIssue.zip
when writing a (fusion) rule with a length window and inserting more events than the
window size drools produces a null pointer exception on the 1st event over the window
size.
the exception produced is:
java.lang.NullPointerException
at
org.drools.core.util.index.RightTupleIndexHashTable.remove(RightTupleIndexHashTable.java:363)
at org.drools.reteoo.AccumulateNode.retractRightTuple(AccumulateNode.java:318)
at org.drools.rule.SlidingLengthWindow.assertFact(SlidingLengthWindow.java:116)
at org.drools.rule.BehaviorManager.assertFact(BehaviorManager.java:94)
at org.drools.reteoo.WindowNode.assertObject(WindowNode.java:167)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:127)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:55)
a similar exception happens when the rule is re-written to use a time window (and the
test updated to overflow that window):
org.drools.RuntimeDroolsException: Unexpected exception executing action
org.drools.rule.SlidingTimeWindow$BehaviorExpireWMAction@1dc39fc3
at
org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:995)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:335)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:127)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:55)
at TestBug2.testBug(TestBug2.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.NullPointerException
at
org.drools.core.util.index.RightTupleIndexHashTable.remove(RightTupleIndexHashTable.java:363)
at org.drools.reteoo.AccumulateNode.retractRightTuple(AccumulateNode.java:318)
at org.drools.rule.SlidingTimeWindow.expireFacts(SlidingTimeWindow.java:189)
at
org.drools.rule.SlidingTimeWindow$BehaviorExpireWMAction.execute(SlidingTimeWindow.java:471)
at
org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:993)
... 31 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira