You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "ravishankar.singaram" <by...@gmail.com> on 2013/08/12 18:51:13 UTC

Cluster in camel using Quartz - ObjectAlreadyExistsException

quick context: We have a simple route using FTP endpoint and scheduled to run
every few minutes using cronscheduledroute policy. The attempt is to enable
clustering (in JBoss EAP 6.0) for the route. JDBCDatastore is used with
cluster enabled. 

The route was deployed in a .ear in clustered JBoss instances. The ear is
successfully installed and deployed in first instance. When the deployment
is attempted at the second instance, an "ObjectAlreadyExistsException"
exception gets thrown. 

Camel: 2.10.2; camel-Quartz - 2.10.2; Quartz scheduler - 1.8.6

The same resulted even if the deployment is performed on 2 non-clustered
jboss instances. Are we missing something basic here? 



-----
Ravishankar Singaram
Technical Lead
Amadeus Software Labs
--
View this message in context: http://camel.465427.n5.nabble.com/Cluster-in-camel-using-Quartz-ObjectAlreadyExistsException-tp5737167.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Cluster in camel using Quartz - ObjectAlreadyExistsException

Posted by dkum003 <DH...@amadeus.com>.
Hello Claus,

I was looking at the JIRA for this issue. 

Could you please let me know on which version of camel is this fixed which
supports quartz-1.

I tried quartz 2.11.2, but this is not fixed in that. 

Regards,
Manish



--
View this message in context: http://camel.465427.n5.nabble.com/Cluster-in-camel-using-Quartz-ObjectAlreadyExistsException-tp5737167p5745345.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Cluster in camel using Quartz - ObjectAlreadyExistsException

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

Thanks for coming back with the stacktrace.
This seems like a bug / room for improvement. I have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-6686

On Fri, Aug 30, 2013 at 12:54 PM, ravishankar.singaram
<ra...@gmail.com> wrote:
> Am sorry, I didnt see your reply. Below is the complete stack trace.
>
> Exception: Unable to store Job with name: 'job-START-SSIM7Route11' and
> group: 'jobGroup-SSIM7Route11', because one already exists with this
> identification.
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
>         at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
>         at
> org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
>         at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
>         at
> com.amadeus.apt.framework.spring.context.ModularContextLoaderListener.contextInitialized(ModularContextLoaderListener.java:33)
>         at
> org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3850)
>         at
> org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:89)
>         at
> org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
>         at
> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
> route SSIM7Route11:
> Route[[From[ftp://blrmsuresh.blr.amadeus.net?binary=true&del... because of
> org.quartz.ObjectAlreadyExistsException: Unable to store Job with name:
> 'job-START-SSIM7Route11' and group: 'jobGroup-SSIM7Route11', because one
> already exists with this identification.
>         at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:176)
>         at
> org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:722)
>         at
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1789)
>         at
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1575)
>         at
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444)
>         at
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
>         at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412)
>         at
> com.amadeus.apt.ib.modules.func.edf.etb.routes.processors.common.RoutesInitializer.initialize(RoutesInitializer.java:119)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
>         ... 20 more
> Caused by: org.apache.camel.RuntimeCamelException:
> org.quartz.ObjectAlreadyExistsException: Unable to store Job with name:
> 'job-START-SSIM7Route11' and group: 'jobGroup-SSIM7Route11', because one
> already exists with this identification.
>         at
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1270)
>         at
> org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy.onInit(CronScheduledRoutePolicy.java:37)
>         at
> org.apache.camel.impl.DefaultRouteContext.commit(DefaultRouteContext.java:207)
>         at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:877)
>         at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:171)
>         ... 34 more
> Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Job with
> name: 'job-START-SSIM7Route11' and group: 'jobGroup-SSIM7Route11', because
> one already exists with this identification.
>         at
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1034)
>         at
> org.quartz.impl.jdbcjobstore.JobStoreSupport$3.execute(JobStoreSupport.java:983)
>         at
> org.quartz.impl.jdbcjobstore.JobStoreSupport$39.execute(JobStoreSupport.java:3590)
>         at
> org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3662)
>         at
> org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
>         at
> org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3586)
>         at
> org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:971)
>         at
> org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:703)
>         at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:255)
>         at
> org.apache.camel.routepolicy.quartz.ScheduledRoutePolicy.scheduleRoute(ScheduledRoutePolicy.java:85)
>
>
>
>
> -----
> Ravishankar Singaram
> Technical Lead
> Amadeus Software Labs
> --
> View this message in context: http://camel.465427.n5.nabble.com/Cluster-in-camel-using-Quartz-ObjectAlreadyExistsException-tp5737167p5738296.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

Re: Cluster in camel using Quartz - ObjectAlreadyExistsException

Posted by "ravishankar.singaram" <ra...@gmail.com>.
Am sorry, I didnt see your reply. Below is the complete stack trace.

Exception: Unable to store Job with name: 'job-START-SSIM7Route11' and
group: 'jobGroup-SSIM7Route11', because one already exists with this
identification.
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
        at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
        at
com.amadeus.apt.framework.spring.context.ModularContextLoaderListener.contextInitialized(ModularContextLoaderListener.java:33)
        at
org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3850)
        at
org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:89)
        at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
        at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
route SSIM7Route11:
Route[[From[ftp://blrmsuresh.blr.amadeus.net?binary=true&del... because of
org.quartz.ObjectAlreadyExistsException: Unable to store Job with name:
'job-START-SSIM7Route11' and group: 'jobGroup-SSIM7Route11', because one
already exists with this identification.
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:176)
        at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:722)
        at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1789)
        at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1575)
        at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1444)
        at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
        at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1412)
        at
com.amadeus.apt.ib.modules.func.edf.etb.routes.processors.common.RoutesInitializer.initialize(RoutesInitializer.java:119)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
        ... 20 more
Caused by: org.apache.camel.RuntimeCamelException:
org.quartz.ObjectAlreadyExistsException: Unable to store Job with name:
'job-START-SSIM7Route11' and group: 'jobGroup-SSIM7Route11', because one
already exists with this identification.
        at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1270)
        at
org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy.onInit(CronScheduledRoutePolicy.java:37)
        at
org.apache.camel.impl.DefaultRouteContext.commit(DefaultRouteContext.java:207)
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:877)
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:171)
        ... 34 more
Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Job with
name: 'job-START-SSIM7Route11' and group: 'jobGroup-SSIM7Route11', because
one already exists with this identification.
        at
org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1034)
        at
org.quartz.impl.jdbcjobstore.JobStoreSupport$3.execute(JobStoreSupport.java:983)
        at
org.quartz.impl.jdbcjobstore.JobStoreSupport$39.execute(JobStoreSupport.java:3590)
        at
org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3662)
        at
org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
        at
org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3586)
        at
org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:971)
        at
org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:703)
        at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:255)
        at
org.apache.camel.routepolicy.quartz.ScheduledRoutePolicy.scheduleRoute(ScheduledRoutePolicy.java:85)
 



-----
Ravishankar Singaram
Technical Lead
Amadeus Software Labs
--
View this message in context: http://camel.465427.n5.nabble.com/Cluster-in-camel-using-Quartz-ObjectAlreadyExistsException-tp5737167p5738296.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Cluster in camel using Quartz - ObjectAlreadyExistsException

Posted by Claus Ibsen <cl...@gmail.com>.
Whats the exception stacktrace you see for ObjectAlreadyExistsException?

Sounds like a JMX MBean clash.

On Mon, Aug 12, 2013 at 6:51 PM, ravishankar.singaram
<by...@gmail.com> wrote:
> quick context: We have a simple route using FTP endpoint and scheduled to run
> every few minutes using cronscheduledroute policy. The attempt is to enable
> clustering (in JBoss EAP 6.0) for the route. JDBCDatastore is used with
> cluster enabled.
>
> The route was deployed in a .ear in clustered JBoss instances. The ear is
> successfully installed and deployed in first instance. When the deployment
> is attempted at the second instance, an "ObjectAlreadyExistsException"
> exception gets thrown.
>
> Camel: 2.10.2; camel-Quartz - 2.10.2; Quartz scheduler - 1.8.6
>
> The same resulted even if the deployment is performed on 2 non-clustered
> jboss instances. Are we missing something basic here?
>
>
>
> -----
> Ravishankar Singaram
> Technical Lead
> Amadeus Software Labs
> --
> View this message in context: http://camel.465427.n5.nabble.com/Cluster-in-camel-using-Quartz-ObjectAlreadyExistsException-tp5737167.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