Bug 986479

Summary: NPE when used Timers with temporal operators in the LHS pattern
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Alessandro Lazarotti <alazarot>
Component: BRE (Expert, Fusion)Assignee: Mario Fusco <mfusco>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: BRMS 5.3.1CC: mfusco, nwallace
Target Milestone: GA   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:28:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 986451    
Attachments:
Description Flags
Unit test
none
Little simpler reproducer none

Description Alessandro Lazarotti 2013-07-19 21:41:08 UTC
Created attachment 775976 [details]
Unit test

Description of problem:
NPE when used Timers with temporal operators. When the rule is invalidated by the 
clock we see:

Unable to execute timer job!
java.lang.NullPointerException
     at 
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1236)
     at 
org.drools.common.Scheduler$ActivationTimerJob.execute(Scheduler.java:91)
     at org.drools.time.SelfRemovalJob.execute(SelfRemovalJob.java:15)
     at 
org.drools.time.impl.DefaultTimerJobInstance.call(DefaultTimerJobInstance.java:47)
     at 
org.drools.time.impl.DefaultTimerJobInstance.call(DefaultTimerJobInstance.java:12)
     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
     at java.util.concurrent.FutureTask.run(FutureTask.java:138)



Steps to Reproduce:
1. Running the unit test attached


Actual results:
NPE

Expected results:
Rules firing as expected without exceptions

Comment 1 JBoss JIRA Server 2013-07-19 22:18:45 UTC
Davide Sottara <dsotty> made a comment on jira DROOLS-196

no exception with 5.6 either, after running the test for 50 cycles

Comment 2 Edson Tirelli 2013-07-23 14:08:17 UTC
Lukas, Alessandro, what is the context for this ticket? Is it for 5.3.x or 6.x? If it is for 5, was it reported by a customer and we need to backport the fixes?

Just trying to understand what needs to be done here.

Comment 3 Edson Tirelli 2013-07-23 14:19:25 UTC
Just got the e-mail from Alessandro:

=============
They should be part of the Roll Up Patch BRMS_5.3.1_3_2013 - 
https://bugzilla.redhat.com/show_bug.cgi?id=986451
BZs to it should be added and committed until 09/Aug (3 weeks) - after 
that is started the productisation work. So an ETA to get it fixed is 
until 09-Aug.
=============

Comment 4 Mario Fusco 2013-08-08 08:41:48 UTC
I ran the provided unit test on the 5.3.x branch twice doing 1000+ cycles for each run but I couldn't reproduce this issue, so I am assuming the fix has been already backported.

Comment 5 Tomas Schlosser 2013-09-11 09:04:44 UTC
Created attachment 796298 [details]
Little simpler reproducer

I have created a little simpler reproducer (got rid of kagent, logger, settings, that were not necessary).

Comment 6 Tomas Schlosser 2013-09-11 09:08:24 UTC
I am able to reproduce the issue with 5.3.1.BRMS-P04.

It is possible this is fixed in 5.3 branch of project, but it did not make its way to the product.

I have not yet found a way to make this a valid test since the mentioned exceptions are shown in System.err only (could not catch them other way). Please make sure (when running the reproducer) to check your error output for reported exception.

Comment 9 JBoss JIRA Server 2013-09-16 08:43:01 UTC
Mario Fusco <mario.fusco> updated the status of jira DROOLS-196 to Resolved

Comment 10 Tomas Schlosser 2013-09-20 06:57:42 UTC
Verified in 5.3.1.BRMS-P04

Comment 14 Red Hat Bugzilla 2025-02-10 03:28:07 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.