Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-4900

Quartz component doesn't start with a persistent scheduler

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.4, 2.9.0
    • Fix Version/s: 2.8.5, 2.9.2, 2.10.0
    • Component/s: camel-quartz
    • Labels:
      None
    • Environment:

      Java 1.6.0_29 64-bit, Mac OS X 10.7 and CentOS 6

    • Estimated Complexity:
      Unknown

      Description

      I have scheduler persistence on but clustering is not turned on. When starting my app the first time, it starts OK. After shutting down and staring a second time, an exception is thrown and the app doesn't start up. This did not occur in 2.8.3. The following exception occurs:

      Caused by: org.quartz.SchedulerException: Trigger's related Job's name cannot be null
      at org.quartz.Trigger.validate(Trigger.java:955) ~[quartz-1.8.5.jar:na]
      at org.quartz.core.QuartzScheduler.rescheduleJob(QuartzScheduler.java:982) ~[quartz-1.8.5.jar:na]
      at org.quartz.impl.StdScheduler.rescheduleJob(StdScheduler.java:302) ~[quartz-1.8.5.jar:na]
      at org.apache.camel.component.quartz.QuartzComponent.doAddJob(QuartzComponent.java:233) ~[camel-quartz-2.9.0.jar:2.9.0]

      In 2.9.0, the code was changed here and this is where it craashes:

      if (!isClustered()) {
          trigger.setStartTime(Calendar.getInstance().getTime());
          scheduler.rescheduleJob(trigger.getName(), trigger.getGroup(), trigger);
      }
      

      My component definition looks like this:

      <endpoint id="myschedule" uri="quartz://fmc/mycron=${myschedule.cron}&amp;stateful=true" />
      

      Again, this affects 2.9.0 but not 2.8.3. I have not found a workaround yet.

        Attachments

        1. quartztest.zip
          7 kB
          Bryan Keller

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              bryanck Bryan Keller
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: