You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mark Richards - News Systems and Architecture <Ma...@bbc.co.uk> on 2013/10/07 14:03:43 UTC

Camel Quartz2 Clustering fails due to durable jobs, has anyone got

Hi,

I’m using Camel 2.12.1, Quartz 2.2.0, Blueprint and Mysql 5.5 in Karaf 2.3.1 and attempting to use clustering, without any success :-(



My aim is to run multiple VMs that will load balance Quartz camel routes and fail over should one stop (losing the odd job schedule isn't too important, but being down for more than 5-10 minutes would be unacceptable; so clustering seems a logical solution. :-)



Steps:

- When I build and start the first Karaf in a Linux VM... it will start Quartz2 and begin triggering jobs.

- When I copy the Karaf build into another VM and start Karaf (both connecting to the same db) I get complaints about Job durability.

- If I restart the first Karaf; it no longer works with Quartz2, also complaining about Job Durability.



So, I'd really appreciate any help or experience anyone has with this; I'm hoping I'm not the first to run Camel Quartz2 clusters and if anyone has an example set of quartz 2 properties and a camel route that works in Blueprint, perhaps Spring (although trying to avoid going Spring heavy); that'd be great!



Alternatively, it there's a way to wire it in in Java DSL, I can give that a go if there's a way to hook the Camel context in from the Blueprint somehow!?



My setup is below! Would really appreciate some help on this; Camel and Quartz seem like a great fit! :-)

The properties seem to work fine if I use Quartz without Camel (Example 13 in Quartz 2 documentation).



Thanks

Mark



I have a blueprint including the following:

  <bean id="quartz2" class="org.apache.camel.component.quartz2.QuartzComponent">

    <property name="properties" ref="props" />

  </bean>

  <reference id="myBean" interface="example.com.MyBean" availability="mandatory" />

  <camel:camelContext id="blueprintContext" trace="true">

    <camel:route>

      <camel:from uri="quartz2://examples/example?job.name=test1&amp;deleteJob=false&amp;stateful=true&amp;cron=0/10+*+*+*+*+?" />

      <camel:bean ref="myBean" method="fire" />

    </camel:route>

  </camel:camelContext>



But get the error:

Failed to create route route1: Route(route1)[[From[quartz2://examples/example?job.name=tes... because of Failed to resolve endpoint: quartz2://examples/example?cron=0%2F10+*+*+*+*+%3F&deleteJob=false&job.name=test1&stateful=true due to: Jobs added with no trigger must be durable.

Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: quartz2://examples/example?cron=0%2F10+*+*+*+*+%3F&deleteJob=false&job.name=test1&stateful=true due to: Jobs added with no trigger must be durable.

Caused by: org.quartz.SchedulerException: Jobs added with no trigger must be durable.







Quartz properties:

org.quartz.scheduler.instanceName: TestScheduler

org.quartz.scheduler.skipUpdateCheck: true

org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool

org.quartz.threadPool.threadCount: 5

org.quartz.threadPool.threadPriority: 5

org.quartz.jobStore.misfireThreshold: 60000

org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX

org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate

org.quartz.jobStore.dataSource=myDS

org.quartz.jobStore.tablePrefix=QRTZ_

org.quartz.jobStore.isClustered=true

org.quartz.dataSource.myDS.driver: com.mysql.jdbc.Driver

org.quartz.dataSource.myDS.URL: jdbc:mysql://windowshost:3306/quartz

org.quartz.dataSource.myDS.user: root

org.quartz.dataSource.myDS.password: password

org.quartz.dataSource.myDS.maxConnections: 8

org.quartz.dataSource.myDS.validationQuery: select 0



Using a feature like:

<feature>

  <bundle start-level="40">mvn:org.apache.camel/camel-core/${camel.version}/jar</bundle>

  <bundle start-level="40">mvn:org.apache.camel/camel-blueprint/${camel.version}/jar</bundle>

  <bundle start-level="40">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.c3p0/${c3p0.version}/jar</bundle>

  <bundle start-level="40">mvn:org.apache.camel/camel-quartz2/${camel.version}/jar</bundle>

  <bundle start-level="40">mvn:org.quartz-scheduler/quartz/${quartz2.version}/jar</bundle>

  <bundle start-level="40">mvn:mysql/mysql-connector-java/${mysql.version}/jar</bundle>

  <bundle start-level="40">mvn:example/osgi-fragment-c3p0-mysql/${project.version}/jar</bundle> <- fragment bundle imports Mysql driver package into C3P0 bundle

</feature>




----------------------------

http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.

---------------------

Re: Camel Quartz2 Clustering fails due to durable jobs, has anyone got

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I logged a ticket
https://issues.apache.org/jira/browse/CAMEL-7280

On Sat, Mar 1, 2014 at 10:33 AM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Yeah feel free to log a JIRA ticket and we love contributions, so
> patches is welcome
> http://camel.apache.org/contributing
>
> On Fri, Feb 28, 2014 at 2:43 PM, fherpertz <fh...@googlemail.com> wrote:
>> Hi,
>>
>> I have a similiar problem and I tried to track it down.
>>
>> After some time of work and testing several possibilities I took a look at
>> the Quartz 2.2.0 sources and at the migration guide from quartz to quartz2.
>>
>> On the quartz homepage in the  Migration guide
>> <http://quartz-scheduler.org/documentation/quartz-2.x/migration-guide>   you
>> find the following section:
>>
>>
>> Example old code:
>>
>>
>> New code:
>>
>>
>>
>> As you see, the setter for the durability is not used anymore. When taking a
>> closer look into the JavaDoc it becomes clear that the setter for durablity
>> was removed from Version 2.0 onwards.
>>
>>
>> This here is the solution which can be found on the internet when you google
>> the issue we are experiencing:
>>
>>
>>
>>
>> The solution above will not work anymore, as the setter for the durability
>> is not available anymore.  See here
>> <http://www.quartz-scheduler.org/api/2.0.0/index.html?org/quartz/JobDetail.html>
>> The solution above is only aplicable if you use camel-quartz instead of
>> camel-quartz2.
>>
>> I tried to use the option storeDurably in the route, but this is not working
>> either, as this methode is in the JobBuilder (org.quartz.JobBuilder) instead
>> of its being in the JobDetail (which is used by Camel-quartz).
>>
>> I think the changes were made to the JobDetails to have a comfortable Java
>> DSL for creating quartz routes.
>>
>>
>> Would this be worth raising a bug?
>>
>> Kind Regards,
>> Francesca
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Camel-Quartz2-Clustering-fails-due-to-durable-jobs-has-anyone-got-tp5741030p5748096.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> Make your Camel applications look hawt, try: http://hawt.io



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Re: Camel Quartz2 Clustering fails due to durable jobs, has anyone got

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah feel free to log a JIRA ticket and we love contributions, so
patches is welcome
http://camel.apache.org/contributing

On Fri, Feb 28, 2014 at 2:43 PM, fherpertz <fh...@googlemail.com> wrote:
> Hi,
>
> I have a similiar problem and I tried to track it down.
>
> After some time of work and testing several possibilities I took a look at
> the Quartz 2.2.0 sources and at the migration guide from quartz to quartz2.
>
> On the quartz homepage in the  Migration guide
> <http://quartz-scheduler.org/documentation/quartz-2.x/migration-guide>   you
> find the following section:
>
>
> Example old code:
>
>
> New code:
>
>
>
> As you see, the setter for the durability is not used anymore. When taking a
> closer look into the JavaDoc it becomes clear that the setter for durablity
> was removed from Version 2.0 onwards.
>
>
> This here is the solution which can be found on the internet when you google
> the issue we are experiencing:
>
>
>
>
> The solution above will not work anymore, as the setter for the durability
> is not available anymore.  See here
> <http://www.quartz-scheduler.org/api/2.0.0/index.html?org/quartz/JobDetail.html>
> The solution above is only aplicable if you use camel-quartz instead of
> camel-quartz2.
>
> I tried to use the option storeDurably in the route, but this is not working
> either, as this methode is in the JobBuilder (org.quartz.JobBuilder) instead
> of its being in the JobDetail (which is used by Camel-quartz).
>
> I think the changes were made to the JobDetails to have a comfortable Java
> DSL for creating quartz routes.
>
>
> Would this be worth raising a bug?
>
> Kind Regards,
> Francesca
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Quartz2-Clustering-fails-due-to-durable-jobs-has-anyone-got-tp5741030p5748096.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Re: Camel Quartz2 Clustering fails due to durable jobs, has anyone got

Posted by fherpertz <fh...@googlemail.com>.
Hi, 

I have a similiar problem and I tried to track it down. 

After some time of work and testing several possibilities I took a look at
the Quartz 2.2.0 sources and at the migration guide from quartz to quartz2. 

On the quartz homepage in the  Migration guide
<http://quartz-scheduler.org/documentation/quartz-2.x/migration-guide>   you
find the following section: 


Example old code:


New code:



As you see, the setter for the durability is not used anymore. When taking a
closer look into the JavaDoc it becomes clear that the setter for durablity
was removed from Version 2.0 onwards. 


This here is the solution which can be found on the internet when you google
the issue we are experiencing: 




The solution above will not work anymore, as the setter for the durability
is not available anymore.  See here
<http://www.quartz-scheduler.org/api/2.0.0/index.html?org/quartz/JobDetail.html>  
The solution above is only aplicable if you use camel-quartz instead of
camel-quartz2.

I tried to use the option storeDurably in the route, but this is not working
either, as this methode is in the JobBuilder (org.quartz.JobBuilder) instead
of its being in the JobDetail (which is used by Camel-quartz). 

I think the changes were made to the JobDetails to have a comfortable Java
DSL for creating quartz routes. 
  

Would this be worth raising a bug? 

Kind Regards, 
Francesca





--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Quartz2-Clustering-fails-due-to-durable-jobs-has-anyone-got-tp5741030p5748096.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Quartz2 Clustering fails due to durable jobs, has anyone got

Posted by Surjit Sen <su...@yahoo.com>.
Hi Claus,
Even though the JIRA ticket CAMEL-7280 mentions that the issue has been
resolved, if I execute QuartzCronRouteDurableJobTest twice in succession
with Oracle DB as JobStore, I get the following exception (on the 2nd run):

org.apache.camel.FailedToCreateRouteException: Failed to create route
route1: Route(route1)[[From[quartz2://myGroup/myTimerName?durableJob...
because of Failed to resolve endpoint:
quartz2://myGroup/myTimerName?cron=0%2F2+*+*+*+*+%3F&durableJob=true&recoverableJob=true
due to: Unable to store Job : 'myGroup.myTimerName', because one already
exists with this identification.
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:180)
	at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:778)
	at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2041)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1791)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1665)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1633)
	at
org.apache.camel.test.junit4.CamelTestSupport.startCamelContext(CamelTestSupport.java:477)
	at
org.apache.camel.test.junit4.CamelTestSupport.doSetUp(CamelTestSupport.java:311)
	at
org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:217)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	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.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:77)
	at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:56)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint:
quartz2://myGroup/myTimerName?cron=0%2F2+*+*+*+*+%3F&durableJob=true&recoverableJob=true
due to: Unable to store Job : 'myGroup.myTimerName', because one already
exists with this identification.
	at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:532)
	at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:71)
	at
org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:190)
	at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106)
	at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112)
	at
org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)
	at
org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:88)
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:888)
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:175)
	... 36 more
Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Job :
'myGroup.myTimerName', because one already exists with this identification.
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1108)
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport$2.executeVoid(JobStoreSupport.java:1062)
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport$VoidTransactionCallback.execute(JobStoreSupport.java:3703)
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport$VoidTransactionCallback.execute(JobStoreSupport.java:3701)
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3787)
	at
org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
	at
org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:1058)
	at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:886)
	at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:249)
	at
org.apache.camel.component.quartz2.QuartzEndpoint.addJobInScheduler(QuartzEndpoint.java:241)
	at
org.apache.camel.component.quartz2.QuartzEndpoint.doStart(QuartzEndpoint.java:190)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at
org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2015)
	at
org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:987)
	at
org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:948)
	at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:528)
	... 44 more

Please let me know how to avoid this situation. Tried a few options, but no
luck. Tried with Camel versions 2.13.2, 2.13.0. I do see the code fixes, but
does not work

Surjit Sen





--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Quartz2-Clustering-fails-due-to-durable-jobs-has-anyone-got-tp5741030p5758379.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Quartz2 Clustering fails due to durable jobs, has anyone got

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Can you try set the job option as

job.durability=true

in the uri. That may work as that is the setter name in the job impl class.


On Mon, Oct 7, 2013 at 2:03 PM, Mark Richards - News Systems and
Architecture <Ma...@bbc.co.uk> wrote:
> Hi,
>
> I'm using Camel 2.12.1, Quartz 2.2.0, Blueprint and Mysql 5.5 in Karaf 2.3.1 and attempting to use clustering, without any success :-(
>
>
>
> My aim is to run multiple VMs that will load balance Quartz camel routes and fail over should one stop (losing the odd job schedule isn't too important, but being down for more than 5-10 minutes would be unacceptable; so clustering seems a logical solution. :-)
>
>
>
> Steps:
>
> - When I build and start the first Karaf in a Linux VM... it will start Quartz2 and begin triggering jobs.
>
> - When I copy the Karaf build into another VM and start Karaf (both connecting to the same db) I get complaints about Job durability.
>
> - If I restart the first Karaf; it no longer works with Quartz2, also complaining about Job Durability.
>
>
>
> So, I'd really appreciate any help or experience anyone has with this; I'm hoping I'm not the first to run Camel Quartz2 clusters and if anyone has an example set of quartz 2 properties and a camel route that works in Blueprint, perhaps Spring (although trying to avoid going Spring heavy); that'd be great!
>
>
>
> Alternatively, it there's a way to wire it in in Java DSL, I can give that a go if there's a way to hook the Camel context in from the Blueprint somehow!?
>
>
>
> My setup is below! Would really appreciate some help on this; Camel and Quartz seem like a great fit! :-)
>
> The properties seem to work fine if I use Quartz without Camel (Example 13 in Quartz 2 documentation).
>
>
>
> Thanks
>
> Mark
>
>
>
> I have a blueprint including the following:
>
>   <bean id="quartz2" class="org.apache.camel.component.quartz2.QuartzComponent">
>
>     <property name="properties" ref="props" />
>
>   </bean>
>
>   <reference id="myBean" interface="example.com.MyBean" availability="mandatory" />
>
>   <camel:camelContext id="blueprintContext" trace="true">
>
>     <camel:route>
>
>       <camel:from uri="quartz2://examples/example?job.name=test1&amp;deleteJob=false&amp;stateful=true&amp;cron=0/10+*+*+*+*+?" />
>
>       <camel:bean ref="myBean" method="fire" />
>
>     </camel:route>
>
>   </camel:camelContext>
>
>
>
> But get the error:
>
> Failed to create route route1: Route(route1)[[From[quartz2://examples/example?job.name=tes... because of Failed to resolve endpoint: quartz2://examples/example?cron=0%2F10+*+*+*+*+%3F&deleteJob=false&job.name=test1&stateful=true due to: Jobs added with no trigger must be durable.
>
> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: quartz2://examples/example?cron=0%2F10+*+*+*+*+%3F&deleteJob=false&job.name=test1&stateful=true due to: Jobs added with no trigger must be durable.
>
> Caused by: org.quartz.SchedulerException: Jobs added with no trigger must be durable.
>
>
>
>
>
>
>
> Quartz properties:
>
> org.quartz.scheduler.instanceName: TestScheduler
>
> org.quartz.scheduler.skipUpdateCheck: true
>
> org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool
>
> org.quartz.threadPool.threadCount: 5
>
> org.quartz.threadPool.threadPriority: 5
>
> org.quartz.jobStore.misfireThreshold: 60000
>
> org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
>
> org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
>
> org.quartz.jobStore.dataSource=myDS
>
> org.quartz.jobStore.tablePrefix=QRTZ_
>
> org.quartz.jobStore.isClustered=true
>
> org.quartz.dataSource.myDS.driver: com.mysql.jdbc.Driver
>
> org.quartz.dataSource.myDS.URL: jdbc:mysql://windowshost:3306/quartz
>
> org.quartz.dataSource.myDS.user: root
>
> org.quartz.dataSource.myDS.password: password
>
> org.quartz.dataSource.myDS.maxConnections: 8
>
> org.quartz.dataSource.myDS.validationQuery: select 0
>
>
>
> Using a feature like:
>
> <feature>
>
>   <bundle start-level="40">mvn:org.apache.camel/camel-core/${camel.version}/jar</bundle>
>
>   <bundle start-level="40">mvn:org.apache.camel/camel-blueprint/${camel.version}/jar</bundle>
>
>   <bundle start-level="40">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.c3p0/${c3p0.version}/jar</bundle>
>
>   <bundle start-level="40">mvn:org.apache.camel/camel-quartz2/${camel.version}/jar</bundle>
>
>   <bundle start-level="40">mvn:org.quartz-scheduler/quartz/${quartz2.version}/jar</bundle>
>
>   <bundle start-level="40">mvn:mysql/mysql-connector-java/${mysql.version}/jar</bundle>
>
>   <bundle start-level="40">mvn:example/osgi-fragment-c3p0-mysql/${project.version}/jar</bundle> <- fragment bundle imports Mysql driver package into C3P0 bundle
>
> </feature>
>
>
>
>
> ----------------------------
>
> http://www.bbc.co.uk
> This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>
> ---------------------



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Re: Camel Quartz2 Clustering fails due to durable jobs, has anyone got

Posted by donzur <do...@gmail.com>.
I am running into a similar problem.  I am trying to use the Quartz2
component in Camel to implement a clustered timer so that I can support HA
timer routes across multiple servers.  When i try to start the route against
a clean quartz database, I can connect and the timer starts polling.  If I
stop the route and restart it fails during initialization with following
exception: 

2013/11/06 15:19:19:537 MST [ERROR] ContextLoader - Context initialization
failed <org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
PollingTimer:
Route(PollingTimer)[[From[quartz2://keystone/fileTransferAsp... because of
Failed to resolve endpoint:
quartz2://keystone/fileTransferAspera?stateful=true&amp;trigger.repeatCount=100000000&amp;trigger.repeatInterval=30000
due to: Jobs added with no trigger must be
durable.>org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
PollingTimer:
Route(PollingTimer)[[From[quartz2://keystone/fileTransferAsp... because of
Failed to resolve endpoint:
quartz2://keystone/fileTransferAspera?stateful=true&trigger.repeatCount=100000000&trigger.repeatInterval=30000
due to: Jobs added with no trigger must be durable.
        at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1344)
        at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)
        at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:301)
        at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
        at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
        at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

Here is the contents of my quartz.properties file

org.quartz.scheduler.instanceName: FileTransferAspera
org.quartz.scheduler.instanceId: AUTO
org.quartz.scheduler.skipUpdateCheck: true
org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount: 5
org.quartz.threadPool.threadPriority: 5
org.quartz.jobStore.misfireThreshold: 60000
org.quartz.jobStore.class: org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass:
org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
org.quartz.jobStore.useProperties: false
org.quartz.jobStore.dataSource: myDS
org.quartz.jobStore.tablePrefix: QRTZ_
org.quartz.jobStore.isClustered: true
org.quartz.scheduler.interruptJobsOnShutdown: true
org.quartz.dataSource.myDS.driver: org.postgresql.Driver
org.quartz.dataSource.myDS.URL: jdbc:postgresql://cocmclnto017:5432/quartz2
org.quartz.dataSource.myDS.user: quartz
org.quartz.dataSource.myDS.password: quartz
org.quartz.dataSource.myDS.maxConnections: 5
org.quartz.dataSource.myDS.validationQuery: select 0

I am using the following versions:
glassfish 4.0
jdk 1.7
camel  2.12.0
quartz 2.2.1
spring 3.2.4.RELEASE
postgres db 9.3.0
postgres jdbc 9.2-1003-jdbc4
activemq 5.8.0

Here is my endpoint uri info:
quartz2://keystone/fileTransferAspera?stateful=true&trigger.repeatCount=100000000&trigger.repeatInterval=30000

I traced the "Jobs added with no trigger must be durable." message back to
the the following quartz source file. org/quartz/core/QuartzScheduler.java.  

Has anyone had success using Quartz2 clustered timer?  

Thanks

Don



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Quartz2-Clustering-fails-due-to-durable-jobs-has-anyone-got-tp5741030p5742893.html
Sent from the Camel - Users mailing list archive at Nabble.com.