Announcement Announcement Module
No announcement yet.
Quartz error: IOException Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quartz error: IOException

    Hi everyone,

    We recently upgraded our Quartz implementation from 1.x to 2.1.6. Among other changes, we had ro replace our references to CronTriggerBean, with the Quartz 2.1 compatible CronTriggerFactoryBean. After doing that, my app won't start. The specific error I am getting is:

    Caused by: JobDataMap values must be Strings when the 'useProperties' property is set.  Key of offending value: jobDetail
    	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.convertToProperty(
    	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeProperties(
    	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(
    	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.insertTrigger(
    	at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(
    It appears that CronTriggerFactoryBean is sticking the jobDetail into the trigger's jobDataMap, and now Quartz is trying to serialize it and save it to the DB. Specifically, in the afterPropertiesSet() method, there is the following code:

    if (this.jobDetail != null) {
    	this.jobDataMap.put(JobDetailAwareTrigger.JOB_DETAIL_KEY, this.jobDetail);
    The old CronTriggerBean didn't do this. Any idea why it is doing this and how I can make the error go away? I don't understand why you would put the job detail into the jobDataMap. Changing the "useProperties" flag isn't an option because I need to use the jobDatMap for legitimate String data.

    Has anyone else seen this issue?

    Thanks in advance for the help!

  • #2
    I ran into this same bug with Spring 3.1.3 and Quartz 2.1.7 with CronTriggerFactoryBean.

    My workaround for now is a custom PersistableCronTriggerFactoryBean based on a blog post fixing the same thing for a SimpleTriggerFactoryBean

    public class PersistableCronTriggerFactoryBean extends CronTriggerFactoryBean {
        public void afterPropertiesSet() {
            //Remove the JobDetail element
    I do have the same question though. Is there a reason for this change in the Spring classes, or is it just a bug that hasn't been reported yet?