camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-9695) During shutdown, Camel cannot unregister error handler
Date Thu, 10 Mar 2016 16:24:40 GMT

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

Claus Ibsen commented on CAMEL-9695:
------------------------------------

What version of Karaf do you use?

Its osgi blueprint that is an arse and shutdown beans in the wrong order.

> During shutdown, Camel cannot unregister error handler
> ------------------------------------------------------
>
>                 Key: CAMEL-9695
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9695
>             Project: Camel
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 2.15.5
>            Reporter: Martin Lichtin
>            Priority: Minor
>
> According to http://camel.apache.org/redeliverypolicy.html
> my camel context is like
> {code:xml}
> <camelContext xmlns="http://camel.apache.org/schema/blueprint" xsi:schemaLocation="http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd"
> 		id="myIdxt" messageHistory="false">
> 	<errorHandler id="myErrorHandler" redeliveryPolicyRef="myRedeliveryPolicy" />
> 	<redeliveryPolicyProfile id="myRedeliveryPolicy" logExhausted="false" />
> 	<route id="myRouteId" errorHandlerRef="myErrorHandler">
> 		<from uri="timer://myTimer?fixedRate=true&amp;period=5000" />
> 		<bean ref="myBean" method="process" />
> 		etc.etc.
> 	</route>
> </camelContext>
> {code}
> During shutdown, the following is output:
> {noformat}
> 2016-03-10 12:33:44,649 | WARN  | FelixStartLevel          | faultManagementLifecycleStrategy
| faultManagementLifecycleStrategy  640 | 130 - org.apache.camel.camel-core - 2.15.5 | Could
not unregister error handler: org.apache.camel.management.mbean.ManagedErrorHandler@72c1
> e7c3 as ErrorHandler MBean.
> org.apache.camel.NoSuchBeanException: No bean could be found in the registry for: myErrorHandler
of type: org.apache.camel.builder.ErrorHandlerBuilder
>         at org.apache.camel.util.CamelContextHelper.mandatoryLookup(CamelContextHelper.java:159)
>         at org.apache.camel.impl.DefaultRouteContext.mandatoryLookup(DefaultRouteContext.java:151)
>         at org.apache.camel.builder.ErrorHandlerBuilderRef.lookupErrorHandlerBuilder(ErrorHandlerBuilderRef.java:137)
>         at org.apache.camel.management.DefaultManagementNamingStrategy.getObjectNameForErrorHandler(DefaultManagementNamingStrategy.java:154)
>         at org.apache.camel.management.ManagedManagementStrategy.getManagedObjectName(ManagedManagementStrategy.java:104)
>         at org.apache.camel.management.ManagedManagementStrategy.unmanageObject(ManagedManagementStrategy.java:143)
>         at org.apache.camel.management.DefaultManagementLifecycleStrategy.unmanageObject(DefaultManagementLifecycleStrategy.java:839)
>         at org.apache.camel.management.DefaultManagementLifecycleStrategy.onErrorHandlerRemove(DefaultManagementLifecycleStrategy.java:638)
>         at org.apache.camel.impl.RouteService.stopChildService(RouteService.java:351)
>         at org.apache.camel.impl.RouteService.doStop(RouteService.java:237)
>         at org.apache.camel.support.ChildServiceSupport.stop(ChildServiceSupport.java:77)
>         at org.apache.camel.support.ChildServiceSupport.stop(ChildServiceSupport.java:101)
>         at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:141)
>         at org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:204)
>         at org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:2843)
>         at org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:2868)
>         at org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:2856)
>         at org.apache.camel.impl.DefaultCamelContext.doStop(DefaultCamelContext.java:2691)
>         at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102)
>         at org.apache.camel.blueprint.BlueprintCamelContext.destroy(BlueprintCamelContext.java:122)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_66]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_66]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_66]
>         at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_66]
>         at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[15:org.apache.aries.blueprint.core:1.4.2]
>         at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[15:org.apache.aries.blueprint.core:1.4.2]
> etc..
> {noformat}



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

Mime
View raw message