[
https://issues.jboss.org/browse/JBRULES-3671?page=com.atlassian.jira.plug...
]
John Genoese edited comment on JBRULES-3671 at 11/7/12 9:06 PM:
----------------------------------------------------------------
I got the same error, without any expiration logic present. I got it after trying to
insert an event fact after retracting one. This same code was working under 5.3.3 for me
as well.
was (Author: john.genoese):
I got the same error, without any expiration logic present. I got it after trying to
insert an event fact after retracting one.
NPE in SlidingLengthWindow.assertFact when some event in window
expired
-----------------------------------------------------------------------
Key: JBRULES-3671
URL:
https://issues.jboss.org/browse/JBRULES-3671
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-compiler (fusion)
Affects Versions: 5.4.0.Final, 5.5.0.Beta1, 5.5.0.CR1
Reporter: Marek Winkler
Assignee: Mark Proctor
Attachments: stackTrace.txt
Consider the following DRL (taken from the CepEspTest integration test, the only
modification is commenting out the {{@expires}} declaration):
{code:title=test_CEP_collectWithWindows.drl}
package org.drools;
import java.util.List
global List timeResults;
global List lengthResults;
declare OrderEvent
@role( event )
//@expires( 2m )
end
rule "collect with time window"
when
$list : List( empty == false ) from collect(
$o : OrderEvent() over window:time(30s) )
then
timeResults.add( $list.size() );
end
rule "collect with length window"
when
$list : List( empty == false ) from collect(
$o : OrderEvent() over window:length(3) )
then
lengthResults.add( $list.size() );
end
{code}
When you insert more than 3 events and advance pseudo clock time such that an event in
the length window expires, a NPE at
{{org.drools.rule.SlidingLengthWindow.assertFact(SlidingLengthWindow.java:115)}} is
thrown. See the attachment for complete stack trace.
The original test with the {{@expires}} declaration uncommented passes.
The problem seems not to be present in Drools 5.3.3.Final.
--
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