camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-9424) CronScheduledRoutePolicy regression introduced with 2.16, setting both start and stop route times fails with duplicate trigger
Date Wed, 16 Dec 2015 11:47:46 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-9424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15059879#comment-15059879
] 

ASF GitHub Bot commented on CAMEL-9424:
---------------------------------------

Github user donovanmuller closed the pull request at:

    https://github.com/apache/camel/pull/732


> CronScheduledRoutePolicy regression introduced with 2.16, setting both start and stop
route times fails with duplicate trigger
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-9424
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9424
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-quartz2
>    Affects Versions: 2.16.0, 2.16.1
>            Reporter: Donovan Muller
>            Assignee: Claus Ibsen
>             Fix For: 2.16.2, 2.17.0
>
>
> This [commit|https://github.com/apache/camel/commit/a704d0331b99a334bc450590ecc556dbdcf04247]
created a regression whereby if you set both a start and a stop route time on a [CronScheduledRoutePolicy|https://github.com/apache/camel/blob/camel-2.16.1/components/camel-quartz2/src/main/java/org/apache/camel/routepolicy/quartz2/CronScheduledRoutePolicy.java],
like:
> {code:java}
> CronScheduledRoutePolicy policy = new CronScheduledRoutePolicy();
> policy.setRouteStartTime("*/3 * * * * ?");
> policy.setRouteStopTime("*/5 * * * * ?");
> {code}
> then adding the Quartz triggers will fail because of duplicate trigger names.
> Basically, the start *and* stop triggers will have the same name because of [this|https://github.com/apache/camel/commit/a704d0331b99a334bc450590ecc556dbdcf04247#diff-5c0db07e20b95adb46acd206b073057aR101]
line.
> {noformat}
> org.apache.camel.FailedToCreateRouteException: Failed to create route test: Route(test)[[From[direct:start]]
-> [To[mock:success]]] because of org.quartz.ObjectAlreadyExistsException: Unable to store
Trigger with name: 'trigger-START-test' and group: 'triggerGroup-test', because one already
exists with this identification.
> 	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:201)
> 	at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:949)
> 	at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3261)
> 	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2984)
> 	at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:176)
> 	at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2814)
> 	at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2810)
> 	at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2833)
> 	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2810)
> 	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
> 	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2779)
> 	at org.apache.camel.routepolicy.quartz2.CronScheduledRoutePolicyTest.testScheduledStartAndStopRoutePolicy(CronScheduledRoutePolicyTest.java:179)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> 	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
> 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> Caused by: org.apache.camel.RuntimeCamelException: org.quartz.ObjectAlreadyExistsException:
Unable to store Trigger with name: 'trigger-START-test' and group: 'triggerGroup-test', because
one already exists with this identification.
> 	at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1642)
> 	at org.apache.camel.routepolicy.quartz2.CronScheduledRoutePolicy.onInit(CronScheduledRoutePolicy.java:41)
> 	at org.apache.camel.impl.DefaultRouteContext.commit(DefaultRouteContext.java:220)
> 	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1076)
> 	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
> 	... 43 more
> Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Trigger with name:
'trigger-START-test' and group: 'triggerGroup-test', because one already exists with this
identification.
> ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message