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
Davide Sottara <dsotty> made a comment on jira DROOLS-196 no exception with 5.6 either, after running the test for 50 cycles
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.
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. =============
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.
Created attachment 796298 [details] Little simpler reproducer I have created a little simpler reproducer (got rid of kagent, logger, settings, that were not necessary).
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.
Fixed by https://github.com/droolsjbpm/drools/commit/d5c18138bba7106af8d3fd2448d89fee807dd389#L2L1233
Mario Fusco <mario.fusco> updated the status of jira DROOLS-196 to Resolved
Verified in 5.3.1.BRMS-P04
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.