Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-10775

Spring + Quartz 2.2.0 Integration is Inconsistent

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.2.4, 4.0 M3
    • Component/s: Task
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      There are a chain of problems in spring quartz integration. I'm really unsure some of the below mentioned error is spring problem or quartz problem.

      I'm getting this error while using quartz-2.2.0 (even in 2.1.7) + Spring-3.2.3, which we where not facing before.

      1)

      ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 50) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pgrSchedular' defined in ServletContext resource [/WEB-INF/applicationQuartzContext-pgr.xml]: Invocation of init method failed; nested exception is org.quartz.JobPersistenceException: Couldn't store trigger 'PGR_ESCALATION_TRIGGER_GROUP.PGR_ESCALATION_TRIGGER' for 'PGR_JOB_GROUP.PGR_ESCALATION_JOB' job:The job (PGR_JOB_GROUP.PGR_ESCALATION_JOB) referenced by the trigger does not exist. [See nested exception: org.quartz.JobPersistenceException: The job (PGR_JOB_GROUP.PGR_ESCALATION_JOB) referenced by the trigger does not exist.]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframewor
      
      

      2)

      14:47:24,783 ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 58) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pgrSchedular' defined in ServletContext resource [/WEB-INF/applicationQuartzContext-pgr.xml]: Cannot resolve reference to bean 'complaintEscalationCronTrigger' while setting bean property 'triggers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'complaintEscalationCronTrigger' defined in ServletContext resource [/WEB-INF/applicationQuartzContext-pgr.xml]: Cannot resolve reference to bean 'complaintEscalationJobDetail' while setting bean property 'jobDetail'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'complaintEscalationJobDetail' defined in ServletContext resource [/WEB-INF/applicationQuartzContext-pgr.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'requestsRecovery' of bean class [org.springframework.scheduling.quartz.JobDetailFactoryBean]: Bean property 'requestsRecovery' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
      	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1387) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1128) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      
      

      3)

      Caused by: org.quartz.JobPersistenceException: Couldn't store trigger 'PGR_ESCALATION_TRIGGER_GROUP.PGR_ESCALATION_TRIGGER' for 'PGR_JOB_GROUP.PGR_ESCALATION_JOB' job:JobDataMap values must be Strings when the 'useProperties' property is set.  Key of offending value: jobDetail [See nested exception: java.io.IOException: JobDataMap values must be Strings when the 'useProperties' property is set.  Key of offending value: jobDetail]
      	at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1222) [quartz-2.2.0.jar:]
      	at org.quartz.impl.jdbcjobstore.JobStoreSupport$4.execute(JobStoreSupport.java:1158) [quartz-2.2.0.jar:]
      	at org.quartz.impl.jdbcjobstore.JobStoreSupport$45.execute(JobStoreSupport.java:3705) [quartz-2.2.0.jar:]
      	at org.quartz.impl.jdbcjobstore.JobStoreCMT.executeInLock(JobStoreCMT.java:245) [quartz-2.2.0.jar:]
      	at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3701) [quartz-2.2.0.jar:]
      	at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1154) [quartz-2.2.0.jar:]
      	at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:962) [quartz-2.2.0.jar:]
      	at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:258) [quartz-2.2.0.jar:]
      	at org.springframework.scheduling.quartz.SchedulerAccessor.addTriggerToScheduler(SchedulerAccessor.java:371) [spring-context-support-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.scheduling.quartz.SchedulerAccessor.registerJobsAndTriggers(SchedulerAccessor.java:303) [spring-context-support-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:511) [spring-context-support-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	... 24 more
      Caused by: java.io.IOException: JobDataMap values must be Strings when the 'useProperties' property is set.  Key of offending value: jobDetail
      	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.convertToProperty(StdJDBCDelegate.java:3115) [quartz-2.2.0.jar:]
      	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeProperties(StdJDBCDelegate.java:3082) [quartz-2.2.0.jar:]
      	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3034) [quartz-2.2.0.jar:]
      	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.insertTrigger(StdJDBCDelegate.java:1045) [quartz-2.2.0.jar:]
      	at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1219) [quartz-2.2.0.jar:]
      	... 36 more
      

      4) FYI i'm using ojdbc6.jar

      [31m17:26:10,949 ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 57) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pgrSchedular' defined in ServletContext resource [/WEB-INF/applicationQuartzContext-pgr.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerException: Registration of jobs and triggers failed: oracle/sql/BLOB
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:608) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) [spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) [spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
      	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
      	at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
      	at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
      	at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_25]
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
      	at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
      	at org.jboss.threads.JBossThread.run(JBossThread.java:122)
      Caused by: org.quartz.SchedulerException: Registration of jobs and triggers failed: oracle/sql/BLOB
      	at org.springframework.scheduling.quartz.SchedulerAccessor.registerJobsAndTriggers(SchedulerAccessor.java:324) [spring-context-support-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:511) [spring-context-support-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1541) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479) [spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      	... 24 more
      

      Attaching application bean xml for quartz.
      Environment is JBoss AS 7 + Spring3.2.3 + Quartz2.2.0 + ubuntu

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                juergen.hoeller Juergen Hoeller
                Reporter:
                sreekanth.nair@egovernments.org sreekanth
                Last updater:
                Spring Issuemaster
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  35 weeks, 1 day ago