Uploaded image for project: 'Quartz Scheduler (Historical - Do Not File New Issues Here - See GitHub)'
  1. Quartz Scheduler (Historical - Do Not File New Issues Here - See GitHub)
  2. QTZ-187

XMLSchedulingDataProcessor is causing scheduler going into inifinite loop.

    XMLWordPrintable

    Details

    • Terracotta Target:
      Quartz 2.1.0
    • Fixed In Revision:
      1579

      Description

      When loading xml data jobs with certain process directivies, it can cause the scheduler startup to go into inifinite loop. Here is how you reproduce it.

      1. Create a quartz.properties like this

      org.quartz.scheduler.skipUpdateCheck = true
      org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
      org.quartz.threadPool.threadCount = 5
      
      # Configure the Job Initialization Plugin
      org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin
      org.quartz.plugin.jobInitializer.fileNames = C:/temp/test.xml,C:/temp/test2.xml
      org.quartz.plugin.jobInitializer.failOnFileNotFound = true
      org.quartz.plugin.jobInitializer.scanInterval = 0
      org.quartz.plugin.jobInitializer.wrapInUserTransaction = false
      

      Adjust the xml file path in your test env.

      2. Startup a quartz scheduler with config above. You will see scheduler go into inifinite loop with these logging output.

      2011-07-08 18:42:37,796 INFO  main org.quartz.core.SchedulerSignalerImpl:61| Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
      2011-07-08 18:42:37,796 INFO  main org.quartz.core.QuartzScheduler:234| Quartz Scheduler v.2.0.1 created.
      2011-07-08 18:42:37,796 INFO  main org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin:202| Registering Quartz Job Initialization Plug-in.
      2011-07-08 18:42:37,796 INFO  main org.quartz.simpl.RAMJobStore:154| RAMJobStore initialized.
      2011-07-08 18:42:37,796 INFO  main org.quartz.core.QuartzScheduler:257| Scheduler meta-data: Quartz Scheduler (v2.0.1) 'QuartzScheduler' with instanceId 'NON_CLUSTERED'
        Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
        NOT STARTED.
        Currently in standby mode.
        Number of jobs executed: 0
        Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 5 threads.
        Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
      
      2011-07-08 18:42:37,796 INFO  main org.quartz.impl.StdSchedulerFactory:1254| Quartz scheduler 'QuartzScheduler' initialized from the specified file : 'config/quartz.properties.load-jobs' from the class resource path.
      2011-07-08 18:42:37,796 INFO  main org.quartz.impl.StdSchedulerFactory:1258| Quartz scheduler version: 2.0.1
      2011-07-08 18:42:37,828 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:510| Parsing XML file: C:/temp/test.xml with systemId: C:/temp/test.xml
      2011-07-08 18:42:38,000 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:1025| Adding 2 jobs, 2 triggers.
      2011-07-08 18:42:38,000 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:1050| Adding job: DEFAULT.my_job1
      2011-07-08 18:42:38,015 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:1050| Adding job: DEFAULT.my_job2
      2011-07-08 18:42:38,015 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:510| Parsing XML file: C:/temp/test2.xml with systemId: C:/temp/test2.xml
      2011-07-08 18:42:38,093 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:1025| Adding 2 jobs, 2 triggers.
      2011-07-08 18:42:38,093 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:1039| Not overwriting existing job: DEFAULT.my_job1
      2011-07-08 18:42:38,093 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:1039| Not overwriting existing job: DEFAULT.my_job2
      2011-07-08 18:42:38,093 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:1160| Not overwriting existing trigger: DEFAULT.my_job1
      2011-07-08 18:42:38,109 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:1160| Not overwriting existing trigger: DEFAULT.my_job1
      2011-07-08 18:42:38,109 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:1160| Not overwriting existing trigger: DEFAULT.my_job1
      2011-07-08 18:42:38,109 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:1160| Not overwriting existing trigger: DEFAULT.my_job1
      2011-07-08 18:42:38,109 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:1160| Not overwriting existing trigger: DEFAULT.my_job1
      2011-07-08 18:42:38,109 INFO  main org.quartz.xml.XMLSchedulingDataProcessor:1160| Not overwriting existing trigger: DEFAULT.my_job1
      ...
      

      The config is simply setting "overwrite-existing-data" to false and "ignore-duplicates", and load it twice to reproduce the job already exists scenerio. (Note that loading single xml file has no problem.)

      This bug is reproducable on Quartz 2.0.1 and 1.8.5.

        Attachments

        1. test.xml
          1 kB
        2. test2.xml
          1 kB

          Activity

            People

            • Assignee:
              jhouse James House
              Reporter:
              light5 Zemian Deng
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: