Bug 986479 - NPE when used Timers with temporal operators in the LHS pattern
NPE when used Timers with temporal operators in the LHS pattern
Status: VERIFIED
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion) (Show other bugs)
BRMS 5.3.1
Unspecified Unspecified
high Severity high
: GA
: ---
Assigned To: Mario Fusco
Tomas Schlosser
:
Depends On:
Blocks: 986451
  Show dependency treegraph
 
Reported: 2013-07-19 17:41 EDT by Alessandro Lazarotti
Modified: 2013-09-20 02:57 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Unit test (5.69 KB, text/x-java)
2013-07-19 17:41 EDT, Alessandro Lazarotti
no flags Details
Little simpler reproducer (5.10 KB, text/x-java)
2013-09-11 05:04 EDT, Tomas Schlosser
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker DROOLS-196 Major Resolved NPE when used Timers with temporal operators in the LHS pattern 2014-09-02 23:43:35 EDT

  None (edit)
Description Alessandro Lazarotti 2013-07-19 17:41:08 EDT
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 18:18:45 EDT
Davide Sottara <dsotty@gmail.com> 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 10:08:17 EDT
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 10:19:25 EDT
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 04:41:48 EDT
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 05:04:44 EDT
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 05:08:24 EDT
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 04:43:01 EDT
Mario Fusco <mario.fusco@gmail.com> updated the status of jira DROOLS-196 to Resolved
Comment 10 Tomas Schlosser 2013-09-20 02:57:42 EDT
Verified in 5.3.1.BRMS-P04

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