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

Quartz component fails to recreate endpoint when it's no more in camelcontext endpoints LRU

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.10.2, 2.10.3
    • 2.10.4, 2.11.0
    • camel-quartz
    • None
    • macos, linux ubuntu, java SE 6

    • Unknown

    Description

      Using camel-quartz in my camel based application (V 2.10.3), I
      schedule a backup every day at 19h20 using this expression
      from(quartz://backup?cron=0+20+19+?).process(...

      the trigger is successfully executed the first day at 19h20, but
      failed the next day with this stacktrace.
      [ERROR] 2013-01-19 19:20:00,003 org.quartz.core.ErrorLogger Job
      (DEFAULT.quartz-endpoint148 threw an exception.
      org.quartz.SchedulerException: Job threw an unhandled exception. [See
      nested exception: org.apache.camel.ResolveEndpointFailedException:
      Failed to resolve endpoint: quartz://backup?cron=0+20+19+%3F++ due
      to: A Quartz job already exists with the name/group: backup/Camel]
      at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
      Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
      resolve endpoint: quartz://backup?cron=0+20+19+%3F++ due to: A
      Quartz job already exists with the name/group: backup/Camel
      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:479)
      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:492)
      at org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:50)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
      ... 1 more
      Caused by: java.lang.IllegalArgumentException: A Quartz job already
      exists with the name/group: backup/Camel
      at org.apache.camel.component.quartz.QuartzComponent.createEndpoint(QuartzComponent.java:137)
      at org.apache.camel.component.quartz.QuartzComponent.createEndpoint(QuartzComponent.java:54)
      at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:91)
      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:461)
      ... 4 more

      I scheduled other tasks running every 5 minutes without any errors.

      Looking at the code, I understand it can append when endpoints are
      removed from the LRU of the camelContext (endoints field from
      DefaultCamelContext).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              denis.delangle Denis Delangle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: