Loading jobs fails if a job class is (re)moved

The job browse screen in add-on jmix-quartz (1.4.4) does not list any job, if a job class has been moved or deleted but an instance is in the database.

Job classes should exist for existing job instances of course, but in my opinion at least other jobs should be listed and I’d prefer to be able to delete or modify the broken ones by the add-on screens as well.

org.quartz.JobPersistenceException: Couldn't retrieve job because a required class was not found: com.company.app.job.RemovedJobClass
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1393) ~[quartz-2.3.2.jar:na]
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$9.execute(JobStoreSupport.java:1382) ~[quartz-2.3.2.jar:na]
	at org.quartz.impl.jdbcjobstore.JobStoreCMT.executeInLock(JobStoreCMT.java:245) ~[quartz-2.3.2.jar:na]
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeWithoutLock(JobStoreSupport.java:3800) ~[quartz-2.3.2.jar:na]
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1379) ~[quartz-2.3.2.jar:na]
	at org.quartz.core.QuartzScheduler.getJobDetail(QuartzScheduler.java:1493) ~[quartz-2.3.2.jar:na]
	at org.quartz.impl.StdScheduler.getJobDetail(StdScheduler.java:498) ~[quartz-2.3.2.jar:na]
	at io.jmix.quartz.service.QuartzService.getAllJobs(QuartzService.java:54) ~[jmix-quartz-1.4.4.jar:na]
	at io.jmix.quartz.screen.jobs.JobModelBrowse.loadJobsData(JobModelBrowse.java:67) ~[jmix-quartz-1.4.4.jar:na]
	at io.jmix.quartz.screen.jobs.JobModelBrowse.jobModelsTableCreateAfterCommitHandler(JobModelBrowse.java:168) ~[jmix-quartz-1.4.4.jar:na]
...
    at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobDetail(StdJDBCDelegate.java:852) ~[quartz-2.3.2.jar:na]
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1390) ~[quartz-2.3.2.jar:na]
	... 130 common frames omitted

Hi,

Thank you for reporting. I’ve created an issue for this problem.

1 Like