camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Issue with timer:// route, NoSuchBeanException on route shutdown
Date Tue, 26 May 2015 12:14:43 GMT
Hi

Are you using a spring xml file? Then its spring app context that is
the registry. Camel does not remove any beans from it. Its spring that
does that. So maybe you have some depends-on spring attribute order
wrong or something.

On Tue, May 26, 2015 at 12:41 PM, Martin Lichtin
<lichtin@yahoo.com.invalid> wrote:
> Is anyone else seeing this issue on shutting down a simple timer-based route such as
>
> <route id="myRoute">
>                         <from uri="timer://myTimer?fixedRate=true&amp;period=2000"
/>
>                         <to uri="bean:myBean" />
> </route>
>
> On shutting down, it reports
>
> 2015-05-22 01:20:14,970 | INFO  | FelixStartLevel          | DefaultShutdownStrategy
         | mel.impl.DefaultShutdownStrategy  184 | 94 - org.apache.camel.camel-core - 2.15.1
| Starting to graceful shutdown 1 routes (timeout 300 seconds)
> 2015-05-22 01:20:16,634 | WARN  | timer://myRoute | TimerConsumer                   
| rg.apache.camel.util.CamelLogger  224 | 94 - org.apache.camel.camel-core - 2.15.1 | Error
processing exchange. Exchange[Message: [Body is null]]. Caused by: [org.apache.camel.NoSuchBeanException
- No bean could be found in the registry for: myBean]
> org.apache.camel.NoSuchBeanException: No bean could be found in the registry for: myBean
> at org.apache.camel.component.bean.RegistryBean.getBean(RegistryBean.java:85)[94:org.apache.camel.camel-core:2.15.1]
> at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:78)[94:org.apache.camel.camel-core:2.15.1]
>
>
> I have double-checked that the bean "myBean" is still around it this point in time.
> It seems perhaps the bean is prematurely removed from the registry?
> Or the timer for some reason fires even though the route is in the middle shutting down?
>
> - Martin



-- 
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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message