Grokbase Groups Camel users June 2010
FAQ
I'm trying to stop and start my CamelContext that contains routes whose entry
points are a Quartz trigger.
When I stop the context and try to restart I get the following error:

org.quartz.SchedulerException: The Scheduler has been shutdown.
at org.quartz.core.QuartzScheduler.validateState(QuartzScheduler.java:637)
at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:688)
at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:265)
at
org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:86)
at
org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:207)
at
org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
at
br.com.michelin.artemis.hub.web.test.CamelServlet.startContext(CamelServlet.java:50)
at
br.com.michelin.artemis.hub.web.test.CamelServlet.doPost(CamelServlet.java:28)
at
br.com.michelin.artemis.hub.web.test.CamelServlet.doGet(CamelServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Is there something I can do to avoid this?

Thanks!
--
View this message in context: http://old.nabble.com/Can%27t-restart-camel-context-when-using-camel-quartz-tp28859666p28859666.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Search Discussions

  • Willem Jiang at Jun 12, 2010 at 3:21 am
    It looks like CamelContext can't work rightly when it is stop and
    restart by let the Scheduler be involved.

    Why don't you use the CamelContext to stop and start the route?
    It much safe to use.

    Willem

    esmiralha wrote:
    I'm trying to stop and start my CamelContext that contains routes whose entry
    points are a Quartz trigger.
    When I stop the context and try to restart I get the following error:

    org.quartz.SchedulerException: The Scheduler has been shutdown.
    at org.quartz.core.QuartzScheduler.validateState(QuartzScheduler.java:637)
    at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:688)
    at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:265)
    at
    org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:86)
    at
    org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:207)
    at
    org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
    at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
    at
    org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
    at
    br.com.michelin.artemis.hub.web.test.CamelServlet.startContext(CamelServlet.java:50)
    at
    br.com.michelin.artemis.hub.web.test.CamelServlet.doPost(CamelServlet.java:28)
    at
    br.com.michelin.artemis.hub.web.test.CamelServlet.doGet(CamelServlet.java:69)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
    at
    org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at
    org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
    at
    org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at
    org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at
    org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
    at
    org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

    Is there something I can do to avoid this?

    Thanks!
  • Esmiralha at Jun 12, 2010 at 5:37 pm
    Hi Willem,

    thank you, I followed your advice and everything works now.

    Regards,
    Luiz


    willem.jiang wrote:
    It looks like CamelContext can't work rightly when it is stop and
    restart by let the Scheduler be involved.

    Why don't you use the CamelContext to stop and start the route?
    It much safe to use.

    Willem

    esmiralha wrote:
    I'm trying to stop and start my CamelContext that contains routes whose
    entry
    points are a Quartz trigger.
    When I stop the context and try to restart I get the following error:

    org.quartz.SchedulerException: The Scheduler has been shutdown.
    at
    org.quartz.core.QuartzScheduler.validateState(QuartzScheduler.java:637)
    at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:688)
    at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:265)
    at
    org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:86)
    at
    org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:207)
    at
    org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
    at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
    at
    org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
    at
    org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
    at
    br.com.michelin.artemis.hub.web.test.CamelServlet.startContext(CamelServlet.java:50)
    at
    br.com.michelin.artemis.hub.web.test.CamelServlet.doPost(CamelServlet.java:28)
    at
    br.com.michelin.artemis.hub.web.test.CamelServlet.doGet(CamelServlet.java:69)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at
    org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at
    org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
    at
    org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at
    org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at
    org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at
    org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
    at
    org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at
    org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at
    org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at
    org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at
    org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
    at
    org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

    Is there something I can do to avoid this?

    Thanks!
    --
    View this message in context: http://old.nabble.com/Can%27t-restart-camel-context-when-using-camel-quartz-tp28859666p28866321.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Claus Ibsen at Jun 12, 2010 at 9:44 am
    Hi

    What runtime are you using? This has been fixed for OSGi environments
    on the trunk.
    And yes restarting Camel context is not something that just works out
    of the box with any kind of components as some cannot restart itself.
    So you have to re-create the camel context instead of starting it in
    those cases.


    On Fri, Jun 11, 2010 at 10:17 PM, esmiralha wrote:

    I'm trying to stop and start my CamelContext that contains routes whose entry
    points are a Quartz trigger.
    When I stop the context and try to restart I get the following error:

    org.quartz.SchedulerException: The Scheduler has been shutdown.
    at org.quartz.core.QuartzScheduler.validateState(QuartzScheduler.java:637)
    at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:688)
    at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:265)
    at
    org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:86)
    at
    org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:207)
    at
    org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
    at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
    at
    org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
    at
    br.com.michelin.artemis.hub.web.test.CamelServlet.startContext(CamelServlet.java:50)
    at
    br.com.michelin.artemis.hub.web.test.CamelServlet.doPost(CamelServlet.java:28)
    at
    br.com.michelin.artemis.hub.web.test.CamelServlet.doGet(CamelServlet.java:69)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
    at
    org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at
    org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
    at
    org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at
    org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at
    org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
    at
    org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

    Is there something I can do to avoid this?

    Thanks!
    --
    View this message in context: http://old.nabble.com/Can%27t-restart-camel-context-when-using-camel-quartz-tp28859666p28859666.html
    Sent from the Camel - Users mailing list archive at Nabble.com.


    --
    Claus Ibsen
    Apache Camel Committer

    Author of Camel in Action: http://www.manning.com/ibsen/
    Open Source Integration: http://fusesource.com
    Blog: http://davsclaus.blogspot.com/
    Twitter: http://twitter.com/davsclaus
  • Esmiralha at Jun 12, 2010 at 5:39 pm
    Claus,

    I'm using Camel 2.2.0. It looks like the problem is what you mention below.
    I followed Willem's advice and I'm just restarting my routes instead of the
    whole context. It works so far.

    Thanks,
    Luiz


    Claus Ibsen-2 wrote:
    Hi

    What runtime are you using? This has been fixed for OSGi environments
    on the trunk.
    And yes restarting Camel context is not something that just works out
    of the box with any kind of components as some cannot restart itself.
    So you have to re-create the camel context instead of starting it in
    those cases.


    On Fri, Jun 11, 2010 at 10:17 PM, esmiralha wrote:

    I'm trying to stop and start my CamelContext that contains routes whose
    entry
    points are a Quartz trigger.
    When I stop the context and try to restart I get the following error:

    org.quartz.SchedulerException: The Scheduler has been shutdown.
    at
    org.quartz.core.QuartzScheduler.validateState(QuartzScheduler.java:637)
    at
    org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:688)
    at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:265)
    at
    org.apache.camel.component.quartz.QuartzEndpoint.addTrigger(QuartzEndpoint.java:86)
    at
    org.apache.camel.component.quartz.QuartzEndpoint.consumerStarted(QuartzEndpoint.java:207)
    at
    org.apache.camel.component.quartz.QuartzConsumer.doStart(QuartzConsumer.java:39)
    at
    org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)
    at
    org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)
    at
    org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:989)
    at
    br.com.michelin.artemis.hub.web.test.CamelServlet.startContext(CamelServlet.java:50)
    at
    br.com.michelin.artemis.hub.web.test.CamelServlet.doPost(CamelServlet.java:28)
    at
    br.com.michelin.artemis.hub.web.test.CamelServlet.doGet(CamelServlet.java:69)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at
    org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at
    org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
    at
    org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at
    org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at
    org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at
    org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at
    org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
    at
    org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at
    org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at
    org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at
    org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
    at
    org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at
    org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at
    org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
    at
    org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

    Is there something I can do to avoid this?

    Thanks!
    --
    View this message in context:
    http://old.nabble.com/Can%27t-restart-camel-context-when-using-camel-quartz-tp28859666p28859666.html
    Sent from the Camel - Users mailing list archive at Nabble.com.


    --
    Claus Ibsen
    Apache Camel Committer

    Author of Camel in Action: http://www.manning.com/ibsen/
    Open Source Integration: http://fusesource.com
    Blog: http://davsclaus.blogspot.com/
    Twitter: http://twitter.com/davsclaus
    --
    View this message in context: http://old.nabble.com/Can%27t-restart-camel-context-when-using-camel-quartz-tp28859666p28866332.html
    Sent from the Camel - Users mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedJun 11, '10 at 8:18p
activeJun 12, '10 at 5:39p
posts5
users3
websitecamel.apache.org

People

Translate

site design / logo © 2022 Grokbase