History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QUARTZ-581
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Henri Yandell
Reporter: Henri Yandell
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Quartz Scheduler

NullPointerException in RAMJobStore.applyMisfire

Created: 03/May/07 12:40 PM   Updated: 19/Sep/07 01:20 AM
Component/s: Job Stores
Affects Version/s: 1.6
Fix Version/s: 1.6.1

File Attachments: 1. Text File QUARTZ-581.patch (0.6 kb)



 Description  « Hide
This was reported as a comment to QUARTZ-557.

Iwan Memruk - [16/Mar/07 03:09 AM ]
Something like that happens for me as well.. (version 1.6.0)

java.lang.NullPointerException
at org.quartz.simpl.RAMJobStore.applyMisfire(RAMJobStore.java:1141)
at org.quartz.simpl.RAMJobStore.resumeTrigger(RAMJobStore.java:1000)
at org.quartz.simpl.RAMJobStore.resumeJobGroup(RAMJobStore.java:1077)
at org.quartz.core.QuartzScheduler.resumeJobGroup(QuartzScheduler.java:1149)
at org.quartz.impl.StdScheduler.resumeJobGroup(StdScheduler.java:461)
....

The Quartz code goes like..
        java.util.Date tnft = tw.trigger.getNextFireTime();
        if (tnft.getTime() > misfireTime) { return false; }
And tnft is suddenly null. It does not happen always though. I could not determine the exact circumstances when it becomes null.

The trigger is a SimpleTrigger. I've tried different misfire settings without any result.

Michael Day - [23/Mar/07 07:19 PM ]
I'm experiencing the same issue as the last commenter. In my particular case, I'm trying to resume a trigger that has no next fire time. applyMisfire() should check to ensure tnft is not null before trying to use it.


 All   Comments   Change History      Sort Order:
Henri Yandell - [18/Sep/07 01:24 PM ]
Solution would seem to be the addition of:

if(tnft == null) { return false; }

Henri Yandell - [19/Sep/07 01:19 AM ]
Null protection fix as a patch file.

Henri Yandell - [19/Sep/07 01:20 AM ]
Applied to SVN, r724 on the 1.6.1 branch and r725 on trunk.