Announcement Announcement Module
Collapse
No announcement yet.
Quartz - Couldn't retrieve job Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quartz - Couldn't retrieve job

    Hi

    I am using Spring 1.2, Hibernate 3.0, PostgreSQL 8 and PostgreSQL 8.0-311 JDBC 3.

    I am trying to configure and use Quartz in Spring environment and use the dataSource I already defined for Hibernate. I always get the following error whenever I start my app.

    Code:
    org.quartz.JobPersistenceException: Couldn't retrieve job: Bad value for type int : \254\355\000\005sr\000\025org.quartz.JobDataMap\237\260\203\350\277\251\260\313\002\000\001Z\000\023allowsTransientDataxr\000\035org.quartz.utils.DirtyFlagMap\023\346.\255(v\012\316\002\000\002Z\000\005dirtyL\000\003mapt\000\017Ljava/util/Map;xp\000sr\000\021java.util.HashMap\005\007\332\301\303\026`\321\003\000\002F\000\012loadFactorI\000\011thresholdxp?@\000\000\000\000\000\014w\010\000\000\000\020\000\000\000\000x\000 [See nested exception: org.postgresql.util.PSQLException: Bad value for type int : \254\355\000\005sr\000\025org.quartz.JobDataMap\237\260\203\350\277\251\260\313\002\000\001Z\000\023allowsTransientDataxr\000\035org.quartz.utils.DirtyFlagMap\023\346.\255(v\012\316\002\000\002Z\000\005dirtyL\000\003mapt\000\017Ljava/util/Map;xp\000sr\000\021java.util.HashMap\005\007\332\301\303\026`\321\003\000\002F\000\012loadFactorI\000\011thresholdxp?@\000\000\000\000\000\014w\010\000\000\000\020\000\000\000\000x\000]
    	at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1024)
    	at org.quartz.impl.jdbcjobstore.JobStoreCMT.retrieveJob(JobStoreCMT.java:377)
    	at org.quartz.core.QuartzScheduler.getJobDetail(QuartzScheduler.java:1075)
    	at org.quartz.impl.StdScheduler.getJobDetail(StdScheduler.java:493)
    	at org.springframework.scheduling.quartz.SchedulerFactoryBean.addJobToScheduler(SchedulerFactoryBean.java:740)
    	at org.springframework.scheduling.quartz.SchedulerFactoryBean.registerJobsAndTriggers(SchedulerFactoryBean.java:701)
    	at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:517)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:937)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:334)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:271)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:310)
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:133)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3831)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4323)
    	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    	at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
    	at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
    	at org.apache.commons.digester.Rule.end(Rule.java:276)
    	at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
    	at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
    	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    	at org.apache.commons.digester.Digester.parse(Digester.java:1567)
    	at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
    	at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
    	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
    	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
    	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:480)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    * Nested Exception (Underlying Cause) ---------------
    org.postgresql.util.PSQLException: Bad value for type int : \254\355\000\005sr\000\025org.quartz.JobDataMap\237\260\203\350\277\251\260\313\002\000\001Z\000\023allowsTransientDataxr\000\035org.quartz.utils.DirtyFlagMap\023\346.\255(v\012\316\002\000\002Z\000\005dirtyL\000\003mapt\000\017Ljava/util/Map;xp\000sr\000\021java.util.HashMap\005\007\332\301\303\026`\321\003\000\002F\000\012loadFactorI\000\011thresholdxp?@\000\000\000\000\000\014w\010\000\000\000\020\000\000\000\000x\000
    	at org.postgresql.jdbc2.AbstractJdbc2ResultSet.toInt(AbstractJdbc2ResultSet.java:2512)
    	at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:1988)
    	at org.postgresql.jdbc3.Jdbc3ResultSet.getBlob(Jdbc3ResultSet.java:54)
    	at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getBlob(AbstractJdbc2ResultSet.java:312)
    	at org.apache.commons.dbcp.DelegatingResultSet.getBlob(DelegatingResultSet.java:526)
    	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.getObjectFromBlob(StdJDBCDelegate.java:3730)
    	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobDetail(StdJDBCDelegate.java:954)
    	at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1004)
    	at org.quartz.impl.jdbcjobstore.JobStoreCMT.retrieveJob(JobStoreCMT.java:377)
    	at org.quartz.core.QuartzScheduler.getJobDetail(QuartzScheduler.java:1075)
    	at org.quartz.impl.StdScheduler.getJobDetail(StdScheduler.java:493)
    	at org.springframework.scheduling.quartz.SchedulerFactoryBean.addJobToScheduler(SchedulerFactoryBean.java:740)
    	at org.springframework.scheduling.quartz.SchedulerFactoryBean.registerJobsAndTriggers(SchedulerFactoryBean.java:701)
    	at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:517)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:937)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:334)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:271)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:310)
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:133)
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3831)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4323)
    	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    	at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
    	at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
    	at org.apache.commons.digester.Rule.end(Rule.java:276)
    	at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
    	at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
    	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    	at org.apache.commons.digester.Digester.parse(Digester.java:1567)
    	at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
    	at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
    	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
    	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
    	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
    	at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:480)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    Here is my quartz jobs and config:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
        "http&#58;//www.springframework.org/dtd/spring-beans.dtd">
    
    <beans>
    	<bean id="userJob"
    		class="org.springframework.scheduling.quartz.JobDetailBean">
    		<property name="jobClass">
    			<value>com.example.schedule.UserJob</value>
    		</property>
    	</bean>
    	
    	<bean id="userTrigger"
    		class="org.springframework.scheduling.quartz.CronTriggerBean">
    		<property name="jobDetail">
    			<ref bean="userJob" />
    		</property>
    		<property name="cronExpression">
    			<!-- Fire at 12.05am &#40;morning&#41; every day -->
    			<value>0 5 0 * * ?</value>
    		</property>
    	</bean>
    	
    	<bean id="scheduler"
    		class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
    		<property name="dataSource">
    			<ref bean="dataSource" />
    		</property>
    		<property name="applicationContextSchedulerContextKey">
    			<value>applicationContext</value>
    		</property>
    		<property name="waitForJobsToCompleteOnShutdown">
    			<value>true</value>
    		</property>
    		<property name="quartzProperties">
    			<props>
    				<!-- Configure Main Scheduler Properties -->
    				<prop key="org.quartz.scheduler.instanceId">AUTO</prop>
    				<!-- Configure ThreadPool -->
    				<prop key="org.quartz.threadPool.class">org.quartz.simpl.SimpleThreadPool</prop>
    				<prop key="org.quartz.threadPool.threadCount">5</prop>
    				<prop key="org.quartz.threadPool.threadPriority">1</prop>
    				<!-- Configure JobStore -->
    				<prop key="org.quartz.jobStore.misfireThreshold">60000</prop>
    				<prop key="org.quartz.jobStore.isClustered">true</prop>
    				<!-- Configure Plugins -->
    				<prop key="org.quartz.plugin.shutdownHook.class">org.quartz.plugins.management.ShutdownHookPlugin</prop>
    				<prop key="org.quartz.plugin.shutdownHook.cleanShutdown">true</prop>
    				<prop key="org.quartz.plugin.triggHistory.class">org.quartz.plugins.history.LoggingJobHistoryPlugin</prop>
    			</props>
    		</property>
    		<property name="triggers">
    			<list>
    				<ref bean="userTrigger" />
    			</list>
    		</property>
    	</bean>
    </beans>
    Here is my UserJob.class:

    Code:
    public class UserJob extends QuartzJobBean &#123;
    	
    	private ApplicationContext applicationContext;
    	
    	public UserJob&#40;&#41; &#123;&#125;
    
    	public void setApplicationContext&#40;ApplicationContext applicationContext&#41; &#123;
    		this.applicationContext = applicationContext;
    	&#125;
    
    	/**
    	 * @see org.springframework.scheduling.quartz.QuartzJobBean#executeInternal&#40;org.quartz.JobExecutionContext&#41;
    	 */
    	protected void executeInternal&#40;JobExecutionContext context&#41;
    			throws JobExecutionException &#123;
    		// do stuff here
    	&#125;
    &#125;
    I use the Quartz database schema provided in the Quartz distribution (tables_postgres.sql).

    Any help appreciated, thank you very much.

  • #2
    Hi

    I think I didn't provide Quartz delegateclass in the Quartz properties. If I do, I get the following error:

    Code:
    org.quartz.SchedulerException&#58; JobStore class 'org.springframework.scheduling.quartz.LocalDataSourceJobStore' props could not be configured. &#91;See nested exception&#58; java.lang.reflect.InvocationTargetException&#93;
    	at org.quartz.impl.StdSchedulerFactory.instantiate&#40;StdSchedulerFactory.java&#58;584&#41;
    	at org.quartz.impl.StdSchedulerFactory.getScheduler&#40;StdSchedulerFactory.java&#58;1047&#41;
    	at org.springframework.scheduling.quartz.SchedulerFactoryBean.createScheduler&#40;SchedulerFactoryBean.java&#58;595&#41;
    	at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet&#40;SchedulerFactoryBean.java&#58;504&#41;
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods&#40;AbstractAutowireCapableBeanFactory.java&#58;937&#41;
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean&#40;AbstractAutowireCapableBeanFactory.java&#58;334&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;222&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;146&#41;
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons&#40;DefaultListableBeanFactory.java&#58;271&#41;
    	at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;310&#41;
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh&#40;AbstractRefreshableWebApplicationContext.java&#58;133&#41;
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext&#40;ContextLoader.java&#58;230&#41;
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext&#40;ContextLoader.java&#58;156&#41;
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized&#40;ContextLoaderListener.java&#58;48&#41;
    	at org.apache.catalina.core.StandardContext.listenerStart&#40;StandardContext.java&#58;3831&#41;
    	at org.apache.catalina.core.StandardContext.start&#40;StandardContext.java&#58;4323&#41;
    	at org.apache.catalina.core.ContainerBase.addChildInternal&#40;ContainerBase.java&#58;823&#41;
    	at org.apache.catalina.core.ContainerBase.addChild&#40;ContainerBase.java&#58;807&#41;
    	at org.apache.catalina.core.StandardHost.addChild&#40;StandardHost.java&#58;595&#41;
    	at org.apache.catalina.core.StandardHostDeployer.addChild&#40;StandardHostDeployer.java&#58;903&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    	at java.lang.reflect.Method.invoke&#40;Method.java&#58;585&#41;
    	at org.apache.commons.beanutils.MethodUtils.invokeMethod&#40;MethodUtils.java&#58;216&#41;
    	at org.apache.commons.digester.SetNextRule.end&#40;SetNextRule.java&#58;256&#41;
    	at org.apache.commons.digester.Rule.end&#40;Rule.java&#58;276&#41;
    	at org.apache.commons.digester.Digester.endElement&#40;Digester.java&#58;1058&#41;
    	at org.apache.catalina.util.CatalinaDigester.endElement&#40;CatalinaDigester.java&#58;76&#41;
    	at org.apache.xerces.parsers.AbstractSAXParser.endElement&#40;Unknown Source&#41;
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement&#40;Unknown Source&#41;
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch&#40;Unknown Source&#41;
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument&#40;Unknown Source&#41;
    	at org.apache.xerces.parsers.XML11Configuration.parse&#40;Unknown Source&#41;
    	at org.apache.xerces.parsers.XML11Configuration.parse&#40;Unknown Source&#41;
    	at org.apache.xerces.parsers.XMLParser.parse&#40;Unknown Source&#41;
    	at org.apache.xerces.parsers.AbstractSAXParser.parse&#40;Unknown Source&#41;
    	at org.apache.commons.digester.Digester.parse&#40;Digester.java&#58;1567&#41;
    	at org.apache.catalina.core.StandardHostDeployer.install&#40;StandardHostDeployer.java&#58;488&#41;
    	at org.apache.catalina.core.StandardHost.install&#40;StandardHost.java&#58;863&#41;
    	at org.apache.catalina.startup.HostConfig.deployDescriptors&#40;HostConfig.java&#58;483&#41;
    	at org.apache.catalina.startup.HostConfig.deployApps&#40;HostConfig.java&#58;427&#41;
    	at org.apache.catalina.startup.HostConfig.start&#40;HostConfig.java&#58;983&#41;
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent&#40;HostConfig.java&#58;349&#41;
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent&#40;LifecycleSupport.java&#58;119&#41;
    	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1091&#41;
    	at org.apache.catalina.core.StandardHost.start&#40;StandardHost.java&#58;789&#41;
    	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1083&#41;
    	at org.apache.catalina.core.StandardEngine.start&#40;StandardEngine.java&#58;478&#41;
    	at org.apache.catalina.core.StandardService.start&#40;StandardService.java&#58;480&#41;
    	at org.apache.catalina.core.StandardServer.start&#40;StandardServer.java&#58;2313&#41;
    	at org.apache.catalina.startup.Catalina.start&#40;Catalina.java&#58;556&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    	at java.lang.reflect.Method.invoke&#40;Method.java&#58;585&#41;
    	at org.apache.catalina.startup.Bootstrap.start&#40;Bootstrap.java&#58;287&#41;
    	at org.apache.catalina.startup.Bootstrap.main&#40;Bootstrap.java&#58;425&#41;
    * Nested Exception &#40;Underlying Cause&#41; ---------------
    java.lang.reflect.InvocationTargetException
    	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    	at java.lang.reflect.Method.invoke&#40;Method.java&#58;585&#41;
    	at org.quartz.impl.StdSchedulerFactory.setBeanProps&#40;StdSchedulerFactory.java&#58;979&#41;
    	at org.quartz.impl.StdSchedulerFactory.instantiate&#40;StdSchedulerFactory.java&#58;582&#41;
    	at org.quartz.impl.StdSchedulerFactory.getScheduler&#40;StdSchedulerFactory.java&#58;1047&#41;
    	at org.springframework.scheduling.quartz.SchedulerFactoryBean.createScheduler&#40;SchedulerFactoryBean.java&#58;595&#41;
    	at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet&#40;SchedulerFactoryBean.java&#58;504&#41;
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods&#40;AbstractAutowireCapableBeanFactory.java&#58;937&#41;
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean&#40;AbstractAutowireCapableBeanFactory.java&#58;334&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;222&#41;
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean&#40;AbstractBeanFactory.java&#58;146&#41;
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons&#40;DefaultListableBeanFactory.java&#58;271&#41;
    	at org.springframework.context.support.AbstractApplicationContext.refresh&#40;AbstractApplicationContext.java&#58;310&#41;
    	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh&#40;AbstractRefreshableWebApplicationContext.java&#58;133&#41;
    	at org.springframework.web.context.ContextLoader.createWebApplicationContext&#40;ContextLoader.java&#58;230&#41;
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext&#40;ContextLoader.java&#58;156&#41;
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized&#40;ContextLoaderListener.java&#58;48&#41;
    	at org.apache.catalina.core.StandardContext.listenerStart&#40;StandardContext.java&#58;3831&#41;
    	at org.apache.catalina.core.StandardContext.start&#40;StandardContext.java&#58;4323&#41;
    	at org.apache.catalina.core.ContainerBase.addChildInternal&#40;ContainerBase.java&#58;823&#41;
    	at org.apache.catalina.core.ContainerBase.addChild&#40;ContainerBase.java&#58;807&#41;
    	at org.apache.catalina.core.StandardHost.addChild&#40;StandardHost.java&#58;595&#41;
    	at org.apache.catalina.core.StandardHostDeployer.addChild&#40;StandardHostDeployer.java&#58;903&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    	at java.lang.reflect.Method.invoke&#40;Method.java&#58;585&#41;
    	at org.apache.commons.beanutils.MethodUtils.invokeMethod&#40;MethodUtils.java&#58;216&#41;
    	at org.apache.commons.digester.SetNextRule.end&#40;SetNextRule.java&#58;256&#41;
    	at org.apache.commons.digester.Rule.end&#40;Rule.java&#58;276&#41;
    	at org.apache.commons.digester.Digester.endElement&#40;Digester.java&#58;1058&#41;
    	at org.apache.catalina.util.CatalinaDigester.endElement&#40;CatalinaDigester.java&#58;76&#41;
    	at org.apache.xerces.parsers.AbstractSAXParser.endElement&#40;Unknown Source&#41;
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement&#40;Unknown Source&#41;
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch&#40;Unknown Source&#41;
    	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument&#40;Unknown Source&#41;
    	at org.apache.xerces.parsers.XML11Configuration.parse&#40;Unknown Source&#41;
    	at org.apache.xerces.parsers.XML11Configuration.parse&#40;Unknown Source&#41;
    	at org.apache.xerces.parsers.XMLParser.parse&#40;Unknown Source&#41;
    	at org.apache.xerces.parsers.AbstractSAXParser.parse&#40;Unknown Source&#41;
    	at org.apache.commons.digester.Digester.parse&#40;Digester.java&#58;1567&#41;
    	at org.apache.catalina.core.StandardHostDeployer.install&#40;StandardHostDeployer.java&#58;488&#41;
    	at org.apache.catalina.core.StandardHost.install&#40;StandardHost.java&#58;863&#41;
    	at org.apache.catalina.startup.HostConfig.deployDescriptors&#40;HostConfig.java&#58;483&#41;
    	at org.apache.catalina.startup.HostConfig.deployApps&#40;HostConfig.java&#58;427&#41;
    	at org.apache.catalina.startup.HostConfig.start&#40;HostConfig.java&#58;983&#41;
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent&#40;HostConfig.java&#58;349&#41;
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent&#40;LifecycleSupport.java&#58;119&#41;
    	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1091&#41;
    	at org.apache.catalina.core.StandardHost.start&#40;StandardHost.java&#58;789&#41;
    	at org.apache.catalina.core.ContainerBase.start&#40;ContainerBase.java&#58;1083&#41;
    	at org.apache.catalina.core.StandardEngine.start&#40;StandardEngine.java&#58;478&#41;
    	at org.apache.catalina.core.StandardService.start&#40;StandardService.java&#58;480&#41;
    	at org.apache.catalina.core.StandardServer.start&#40;StandardServer.java&#58;2313&#41;
    	at org.apache.catalina.startup.Catalina.start&#40;Catalina.java&#58;556&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke0&#40;Native Method&#41;
    	at sun.reflect.NativeMethodAccessorImpl.invoke&#40;NativeMethodAccessorImpl.java&#58;39&#41;
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke&#40;DelegatingMethodAccessorImpl.java&#58;25&#41;
    	at java.lang.reflect.Method.invoke&#40;Method.java&#58;585&#41;
    	at org.apache.catalina.startup.Bootstrap.start&#40;Bootstrap.java&#58;287&#41;
    	at org.apache.catalina.startup.Bootstrap.main&#40;Bootstrap.java&#58;425&#41;
    Caused by&#58; org.quartz.impl.jdbcjobstore.InvalidConfigurationException&#58; Invalid delegate class&#58; org.quartz.impl.jdbcjobstore.PostreSQLDelegate
    	at org.quartz.impl.jdbcjobstore.JobStoreSupport.setDriverDelegateClass&#40;JobStoreSupport.java&#58;427&#41;
    	... 63 more
    Could someone please help me with this? I really appreciate any help.

    Thanks

    Comment


    • #3
      It seems that you haven't specified the jobStore class and the driver delegate class. You should have something like that:
      Code:
      ....
      <!-- Job store -->
      <prop key="org.quartz.jobStore.misfireThreshold">60000</prop>
      <prop key="org.quartz.jobStore.class">org.quartz.impl.jdbcjobstore.JobStoreTX</prop>
      <prop key="org.quartz.jobStore.driverDelegateClass">org.quartz.impl.jdbcjobstore.PostgreSQLDelegate</prop>
      <prop key="org.quartz.jobStore.useProperties">false</prop>
      ....
      And do you really need to have the clustered flag set to true.

      Comment


      • #4
        Hi,

        do you really need to have the clustered flag set to true
        I do need to set the clustered flag to true.

        It seems that you haven't specified the jobStore class and the driver delegate class
        I thought I wouldn't need to specify the jobstore class and the driver delegate class if I set the dataSource property. Spring will use LocalDataSourceJobStore if the dataSource property is set.

        Comment


        • #5
          Hi

          If I don't set the dataSource property for SchedulerFactoryBean, then Quartz works fine (using Quartz JobStoreTX). I think the problem is the LocalDataSourceJobStore doesn't recognize PostgreSQLDelegate when set and doesn't recognize the type of the JOB_DATA column in the qrtz_job_details table correctly. Why bytea <-> int instead of bytea <-> bytea?

          Here is my dataSource bean:

          Code:
          <bean id="dataSource"
          	class="org.springframework.jndi.JndiObjectFactoryBean">
          	<property name="jndiName">
          		<value>java&#58;comp/env/jdbc/careerpost</value>
          	</property>
          </bean>
          Is this a bug and should I report it? What can I do to fix this?

          Thanks

          Comment

          Working...
          X