Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-3538

Manually triggering routes with a quartz endpoint does not work.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jboss-fuse-6.2.1
    • jboss-fuse-6.1
    • Camel
    • None
    • % %
    • Hide

      When we run the attached TestCase [RoutTrigger.zip and LgRotation.zip] the below Error is seen.

      ---------------------------------------------------------------------------------------------------------------------------------------
      org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: quartz2://LogRotationTimer?cron=05+00+00+%3F due to: Trigger key Camel_a.b.c.d.rhscase.LgRotation.LogRotationTimer is already in used by Endpoint[quartz2://LogRotationTimer?cron=05+00+00+*+*+%3F]
      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:531)[142:org.apache.camel.camel-core:2.12.0.redhat-610387]
      at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:544)[142:org.apache.camel.camel-core:2.12.0.redhat-610387]
      at org.apache.camel.component.quartz2.CamelJob.lookupQuartzEndpoint(CamelJob.java:123)[346:org.apache.camel.camel-quartz2:2.12.0.redhat-610387]
      at org.apache.camel.component.quartz2.CamelJob.execute(CamelJob.java:49)[346:org.apache.camel.camel-quartz2:2.12.0.redhat-610387]
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202)[345:org.quartz-scheduler.quartz:2.2.1]
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)[345:org.quartz-scheduler.quartz:2.2.1]
      Caused by: java.lang.IllegalArgumentException: Trigger key Camel_a.b.c.d.rhscase.LgRotation.LogRotationTimer is already in used by Endpoint[quartz2://LogRotationTimer?cron=05+00+00+*+*+%3F]
      ---------------------------------------------------------------------------------------------------------------------------------------

      Steps to reproduce:
      ===================

      1) deploy both bundles.

      2) from the karaf console execute the command:

      JBossFuse:karaf@root> triggerroute list

      executing this command should show something like this example output:

      [route]: LogRotation [trigger.jobName]: LogRotationTimer [trigger.groupName]: Camel_a.b.c.d.rhscase.LgRotation - Tue Jun 23 00:00:05 CEST 2015

      3) Now we want to trigger (execute immediately) this route by executing this command:

      JBossFuse:karaf@root> triggerroute LogRotation
      Route: LogRotation has been triggered.

      It says the route was triggered, but in the fuse.log we can find the above errors messages:

      Show
      When we run the attached TestCase [RoutTrigger.zip and LgRotation.zip] the below Error is seen. --------------------------------------------------------------------------------------------------------------------------------------- org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: quartz2://LogRotationTimer?cron=05+00+00+ %3F due to: Trigger key Camel_a.b.c.d.rhscase.LgRotation.LogRotationTimer is already in used by Endpoint [quartz2://LogRotationTimer?cron=05+00+00+*+*+%3F] at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:531) [142:org.apache.camel.camel-core:2.12.0.redhat-610387] at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:544) [142:org.apache.camel.camel-core:2.12.0.redhat-610387] at org.apache.camel.component.quartz2.CamelJob.lookupQuartzEndpoint(CamelJob.java:123) [346:org.apache.camel.camel-quartz2:2.12.0.redhat-610387] at org.apache.camel.component.quartz2.CamelJob.execute(CamelJob.java:49) [346:org.apache.camel.camel-quartz2:2.12.0.redhat-610387] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [345:org.quartz-scheduler.quartz:2.2.1] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [345:org.quartz-scheduler.quartz:2.2.1] Caused by: java.lang.IllegalArgumentException: Trigger key Camel_a.b.c.d.rhscase.LgRotation.LogRotationTimer is already in used by Endpoint [quartz2://LogRotationTimer?cron=05+00+00+*+*+%3F] --------------------------------------------------------------------------------------------------------------------------------------- Steps to reproduce: =================== 1) deploy both bundles. 2) from the karaf console execute the command: JBossFuse:karaf@root> triggerroute list executing this command should show something like this example output: [route] : LogRotation [trigger.jobName] : LogRotationTimer [trigger.groupName] : Camel_a.b.c.d.rhscase.LgRotation - Tue Jun 23 00:00:05 CEST 2015 3) Now we want to trigger (execute immediately) this route by executing this command: JBossFuse:karaf@root> triggerroute LogRotation Route: LogRotation has been triggered. It says the route was triggered, but in the fuse.log we can find the above errors messages:

      How to to trigger (execute immediately) routes by hand.
      For this a Karaf command is written. This command accepts a route name and finds the JobKey for the job to be triggered.

      It works in the sense that the JobKey is found and the job is triggered. However, in the logging something else can be seen. It shows that for some reason it can't trigger the job. In fact, the result is that the job is deleted altogether.

      How can the self-written command to be able to trigger jobs manually.

              janstey@redhat.com Jonathan Anstey
              rhn-support-hnaram Herambh Naram (Inactive)
              Jan Bouska Jan Bouska
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: