Announcement Announcement Module
No announcement yet.
Spring + Quartz issue: Couldn't clean volatile data Invalid Number error Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring + Quartz issue: Couldn't clean volatile data Invalid Number error

    I'm using spring and quartz to schedule jobs to trigger at different time intervals. I've created a test case in which I want the job to run every minute and i want the job details and info stored in my oracle database. When ran i get the following errors:

    Exception in thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.scheduling.quartz.SchedulerFa ctoryBean' defined in file [C:\AtlasView\AtlasPro\projects\scheduler\web\WEB-INF\applicationContext.xml]: Initialization of bean failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery.
    org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Couldn't clean volatile data: ORA-01722: invalid number
    [See nested exception: java.sql.SQLException: ORA-01722: invalid number

    My tables are already created in the db. Any assistance would be greatly appreciated. Thanks!

    <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean" lazy-init="false" >
    	<property name="waitForJobsToCompleteOnShutdown" value="true"/>
    	<property name="applicationContextSchedulerContextKey" value="applicationContext"/>
    	<property name="quartzProperties">
    	<!--  Main Scheduler Properties -->
    	<prop key="org.quartz.scheduler.instanceName"> DefaultQuartzScheduler</prop>
    	<prop key="org.quartz.scheduler.instanceId"> AUTO</prop>
    	<prop key="org.quartz.scheduler.rmi.export"> false</prop>
    	<prop key="org.quartz.scheduler.rmi.proxy"> false</prop>
    	<prop key="org.quartz.scheduler.wrapJobExecutionInUserTransaction"> false</prop>
    	<!-- ThreadPool -->
    	<prop key="org.quartz.threadPool.class">org.quartz.simpl.SimpleThreadPool</prop>
    	<prop key="org.quartz.threadPool.threadCount">10</prop>
    	<prop key="org.quartz.threadPool.threadPriority">5</prop>
    	<prop key="org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread">true</prop>
    	<!-- 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.class">org.quartz.impl.jdbcjobstore.JobStoreCMT</prop>
    	<prop key="org.quartz.jobStore.driverDelegateClass"></prop>
    	<prop key="org.quartz.jobStore.dataSource">myDS</prop>
    	<prop key="org.quartz.jobStore.nonManagedTXDataSource">myDS</prop>
    	<prop key="org.quartz.jobStore.tablePrefix">QRTZ_</prop> 
    	<prop key="org.quartz.jobStore.useProperties">false</prop>
    	<!-- Configure Datasources -->
    	<prop key="org.quartz.dataSource.myDS.driver">oracle.jdbc.driver.OracleDriver</prop>
    	<prop key="org.quartz.dataSource.myDS.URL">jdbc:oracle:thin:</prop>
    	<prop key="org.quartz.dataSource.myDS.user">uno</prop>
    	<prop key="org.quartz.dataSource.myDS.password">uno</prop>
    	<!-- Quartz Job Plugin Information -->
    	<prop key="org.quartz.plugin.shutdownhook.class"></prop>
    	<prop key="org.quartz.plugin.shutdownhook.cleanShutdown">true</prop>
    <bean id="scheduler" class="org.springframework.scheduling.quartz.JobDetailBean">
    <property name="jobClass" value="com.bah.scheduler.utilities.NewJob"/>
    public class NewJob implements Job  {
    	public void execute(JobExecutionContext context)throws JobExecutionException{
    		System.out.println("Hello World " +new java.util.Date());	
    public class NewScheduler {
    	public static void main(String[] args) throws Exception {
    		System.out.println("Starting Spring Timer Version");
    		ApplicationContext context = new FileSystemXmlApplicationContext("web/WEB-INF/applicationContext.xml");
    		Scheduler scheduler = (Scheduler)context.getBean("scheduler");
    		System.out.println("Starting Scheduler");
    catch(SchedulerException se){
    Last edited by bkc6m; Mar 11th, 2009, 10:07 AM.

  • #2
    What are the details of the interaction between your code and the database? It's very possible I'm blind, but I don't see any code which interacts with the database.

    ORA-01722 is thrown when it tries to convert a non-numeric string into a number. Could you be passing an invalid or null value to Oracle?

    Here's some more info on the Oracle error:

    Also, you can write [CODE ] ... [ /CODE] around your source code when you post to the forum, and it will be much easier to read.


    • #3
      Maybe i'm confused on how jobs are stored in the DB, but my understanding is that by configuring the jobstore and datasource in the quartzproperties defined within my applicationContext.xml file, that allows a connection to the database. By defining jobs and triggers (within applicationContext.xml) and then running the scheduler (, will fire those jobs and save them to the DB. Is that not what happens? Is more code needed to save jobs to the DB?


      • #4
        Hi friends, I was looking for some information about the garden tools but still unable to find the rarlevent information so it would be great if any one can refer me a page with the required information.