Quartz Errors

Description

If you are seeing errors like this after an upgrade, it means that quartz has serialized an object to the database in its job store that has changed between the versions.  You can stop these errors by calling the SQL below.

[15/08/17 09:03:42:417 CST] ERROR quartz.DotJobStore: ClusterManager: Error managing cluster: Failure recovering jobs: Couldn't store trigger 'recover_16edc91a-084b-4940-baef-3995ff51fb4d_1502809422411' for 'DeleteFieldJob-316635a0-0fab-455b-b0f5-dadd30f5b690' job:com.liferay.portal.model.UserModel; local class incompatible: stream classdesc serialVersionUID = 3117673322348116052, local class serialVersionUID = -7398324658422900150
org.quartz.JobPersistenceException: Failure recovering jobs: Couldn't store trigger 'recover_16edc91a-084b-4940-baef-3995ff51fb4d_1502809422411' for 'DeleteFieldJob-316635a0-0fab-455b-b0f5-dadd30f5b690' job:com.liferay.portal.model.UserModel; local class incompatible: stream classdesc serialVersionUID = 3117673322348116052, local class serialVersionUID = -7398324658422900150
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.clusterRecover(JobStoreSupport.java:3538) ~[dot.quartz-all-1.8.6_2.jar:?]
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.doCheckin(JobStoreSupport.java:3233) ~[dot.quartz-all-1.8.6_2.jar:?]
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3847) [dot.quartz-all-1.8.6_2.jar:?]
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:3883) [dot.quartz-all-1.8.6_2.jar:?]
Caused by: org.quartz.JobPersistenceException: Couldn't store trigger 'recover_16edc91a-084b-4940-baef-3995ff51fb4d_1502809422411' for 'DeleteFieldJob-316635a0-0fab-455b-b0f5-dadd30f5b690' job:com.liferay.portal.model.UserModel; local class incompatible: stream classdesc serialVersionUID = 3117673322348116052, local class serialVersionUID = -7398324658422900150
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1270) ~[dot.quartz-all-1.8.6_2.jar:?]
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.clusterRecover(JobStoreSupport.java:3465) ~[dot.quartz-all-1.8.6_2.jar:?]
	... 3 more
Caused by: java.io.InvalidClassException: com.liferay.portal.model.UserModel; local class incompatible: stream classdesc serialVersionUID = 3117673322348116052, local class serialVersionUID = -7398324658422900150
	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621) ~[?:1.8.0_40]
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623) ~[?:1.8.0_40]
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518) ~[?:1.8.0_40]
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623) ~[?:1.8.0_40]
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518) ~[?:1.8.0_40]
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774) ~[?:1.8.0_40]
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) ~[?:1.8.0_40]
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371) ~[?:1.8.0_40]


Please Note: This will delete all your stored and scheduled quartz jobs.  All system jobs will automatically rebuild themselves on restart but you will need to re-set up any TimeMachine and Site Search jobs you have scheduled.


Code

delete from qrtz_excl_fired_triggers;
delete from qrtz_excl_cron_triggers;
delete from qrtz_excl_triggers;
delete from qrtz_excl_scheduler_state;
delete from qrtz_excl_job_details;

delete from qrtz_fired_triggers;
delete from qrtz_cron_triggers;
delete from qrtz_triggers;
delete from qrtz_scheduler_state;
delete from qrtz_job_details;