Issue Details (XML | Word | Printable)

Key: QUARTZ-719
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: James House
Reporter: Vít Popelka
Votes: 0
Watchers: 0
Operations

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

NPE when acquire next trigger from JDBC job store

Created: 02/Dec/08 06:31 AM   Updated: 19/Mar/09 02:21 PM
Component/s: Job Stores
Affects Version/s: 1.6.3
Fix Version/s: 1.6.4

File Attachments: 1. File scheduler.properties (1 kB)

Environment:
Sun Java System Application Server 9.1_02 (build b04-fcs)
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0


 Description  « Hide
Scheduler generates following exception:

[#|2008-12-02T13:14:09.528+0100|SEVERE|sun-appserver9.1|org.quartz.core.ErrorLogger|_ThreadID=24;_ThreadName=TOMSServerScheduler_QuartzSchedulerThread;_RequestID=f31e9e20-dc34-4915-bea7-c8b4fc3fa0f0;|An error occured while scanning for the next trigger to fire.
org.quartz.JobPersistenceException: Couldn't acquire next trigger: null [See nested exception: java.lang.NullPointerException]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2784)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$36.execute(JobStoreSupport.java:2733)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3754)
at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeWithoutLock(JobStoreSupport.java:3659)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2730)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:266)
Caused by: java.lang.NullPointerException
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2779)
... 6 more
|#]


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Vít Popelka added a comment - 02/Dec/08 06:31 AM
Used scheduler properties.

James House added a comment - 02/Dec/08 09:12 AM

Bummer. I fixed one like this (in this same block of code) already with 1.6.3. Sorry I missed this case.

I'll get a new release out ASAP.


James House added a comment - 02/Dec/08 09:48 AM

Added additional null check in outer loop of the method.

This possible NPE case occurs when a trigger that is being acquired is deleted at the same time by another thread (e.g. maybe the trigger is a repeating trigger, and it's job unscheduled itself while it was executing, and it happened to do so while the scheduler was in this narrow block of code in the aquireNextTrigger method).



Ray Case added a comment - 19/Mar/09 01:12 PM
should be the same bug