Quartz throws NPE is job in que has no bean

Description

If you:

1) Register a job with quartz
2) Create an entry in the tool under jobs through the UI
3) (optionaly) create triggers
then
4) Delete the registration assosiated with the jon in components xml

Quartz throws a series of NPE's whenever the Queue is activated:

INFO: init() (2007-03-16 11:58:26,402 main_org.sakaiproject.user.impl.UserAuthnComponent)
48.171: [GC [PSYoungGen: 302252K->43643K(302336K)] 302252K->47163K(1001408K), 0.0819420 secs]
ERROR: Job DEFAULT.CTQueue threw an unhandled Exception: (2007-03-16 11:58:26,514 QuartzScheduler_Worker-1_org.quartz.core.JobRunShell)
java.lang.NullPointerException
at org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:72)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
ERROR: Job DEFAULT.CTQueue threw an unhandled Exception: (2007-03-16 11:58:26,514 QuartzScheduler_Worker-0_org.quartz.core.JobRunShell)
java.lang.NullPointerException
at org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:72)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
ERROR: Job (DEFAULT.CTQueue threw an exception. (2007-03-16 11:58:26,517 QuartzScheduler_Worker-0_org.quartz.core.ErrorLogger)
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
at org.quartz.core.JobRunShell.run(JobRunShell.java:214)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

  • Nested Exception (Underlying Cause) ---------------
    java.lang.NullPointerException
    at org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:72)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
    ERROR: Job (DEFAULT.CTQueue threw an exception. (2007-03-16 11:58:26,517 QuartzScheduler_Worker-1_org.quartz.core.ErrorLogger)
    org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
    at org.quartz.core.JobRunShell.run(JobRunShell.java:214)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

  • Nested Exception (Underlying Cause) ---------------
    java.lang.NullPointerException
    at org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:72)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
    2007/03/16 11:58:26 org.apache.catalina.startup.HostConfig deployWAR

Solution: if the registration of the job is null the schduler should handle this elegantly with warns ect and possibly flag the jobs appropriatly so they are not called

is related to

Activity

Show:

Hudson CI Server November 26, 2013 at 4:05 PM

Integrated in jobscheduler trunk #741 (See http://builds.sakaiproject.org:8080/job/jobscheduler%20trunk/741/)
NPE in quartz when job has no bean (Revision 131978)

Result = SUCCESS

Earle Nietzel November 26, 2013 at 3:08 PM

Added another check to make sure a job actually exists.

amberg1 March 24, 2011 at 6:37 AM

What is the status of this Jira?

Megan May January 6, 2009 at 1:53 PM

Andrew hasn't been working on this project for roughly a year. Unassigned all the tickets that are currently assigned to him

Fixed

Details

Priority

Affects versions

Fix versions

Assignee

Reporter

Created March 16, 2007 at 3:05 AM
Updated July 23, 2018 at 1:56 PM
Resolved November 26, 2013 at 3:08 PM