[jboss-jira] [JBoss JIRA] (JBRULES-3671) NPE in SlidingLengthWindow.assertFact when some event in window expired

Axel V (JIRA) jira-events at lists.jboss.org
Tue Jan 8 05:21:08 EST 2013


    [ https://issues.jboss.org/browse/JBRULES-3671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744008#comment-12744008 ] 

Axel V edited comment on JBRULES-3671 at 1/8/13 5:21 AM:
---------------------------------------------------------

I'm getting a similiar error (http://drools.46999.n3.nabble.com/NullPointerException-bug-td4021339.html).
It seems that using window:time( 10s ) instead of window:length( 1 ) works OK.
                
      was (Author: alexoi):
    I'm getting a similiar error (http://drools.46999.n3.nabble.com/NullPointerException-bug-td4021339.html).
                  
> NPE in SlidingLengthWindow.assertFact when some event in window expired
> -----------------------------------------------------------------------
>
>                 Key: JBRULES-3671
>                 URL: https://issues.jboss.org/browse/JBRULES-3671
>             Project: JBRULES
>          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: Edson Tirelli
>             Fix For: 6.0.0.Alpha1
>
>         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


More information about the jboss-jira mailing list