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] [Resolved] (CAMEL-7233) Avoid logging hundreds of NoSuchBeanException when stopping Camel context
Date Sun, 23 Feb 2014 10:07:19 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-7233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-7233.
--------------------------------

    Resolution: Won't Fix

This is not a solution to just debug log that instead. There was a problem with shutting down
cleanly and the user should be ware of this.

> Avoid logging hundreds of NoSuchBeanException when stopping Camel context
> -------------------------------------------------------------------------
>
>                 Key: CAMEL-7233
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7233
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.10.7
>         Environment: ServiceMix 4.5.3
>            Reporter: metatech
>            Priority: Trivial
>         Attachments: camel_unmanage_ignore_nosuchbean.patch
>
>
> When stopping ServiceMix with about 40 Camel Spring bundles, a NoSuchBeanException is
logged several hundred times, which generates a few megabytes in the logs.
> This patch catches the exception to avoid it.
> {code}
> 2014-02-21 11:59:33,645 | WARN  | Timer-2          |  | faultManagementLifecycleStrategy
| Could not unregister error handler: org.apache.camel.management.mbean.ManagedErrorHandler@5110989a
as ErrorHandler MBean.
> org.apache.camel.NoSuchBeanException: Cannot lookup: evenementsErrorHandler from registry:
org.apache.camel.spring.spi.ApplicationContextRegistry@6f4f89ed with expected type: interface
org.apache.camel.builder.ErrorHandlerBuilder due: Error creating bean with name 'eventsErrorHandler':
Singleton bean creation not allowed while the singletons of this factory are in destruction
(Do not request a bean from a BeanFactory in a destroy method implementation!)
> 	at org.apache.camel.impl.CompositeRegistry.lookup(CompositeRegistry.java:57)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookup(PropertyPlaceholderDelegateRegistry.java:62)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.util.CamelContextHelper.lookup(CamelContextHelper.java:108)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.util.CamelContextHelper.mandatoryLookup(CamelContextHelper.java:128)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.impl.DefaultRouteContext.mandatoryLookup(DefaultRouteContext.java:146)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.builder.ErrorHandlerBuilderRef.lookupErrorHandlerBuilder(ErrorHandlerBuilderRef.java:125)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.management.DefaultManagementNamingStrategy.getObjectNameForErrorHandler(DefaultManagementNamingStrategy.java:140)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.management.ManagedManagementStrategy.getManagedObjectName(ManagedManagementStrategy.java:102)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.management.ManagedManagementStrategy.unmanageObject(ManagedManagementStrategy.java:135)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.management.DefaultManagementLifecycleStrategy.unmanageObject(DefaultManagementLifecycleStrategy.java:790)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.management.DefaultManagementLifecycleStrategy.onErrorHandlerRemove(DefaultManagementLifecycleStrategy.java:589)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.impl.RouteService.stopChildService(RouteService.java:333)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.impl.RouteService.doStop(RouteService.java:212)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.support.ChildServiceSupport.stop(ChildServiceSupport.java:74)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.support.ChildServiceSupport.stop(ChildServiceSupport.java:98)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:112)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:158)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1751)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1776)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1764)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.impl.DefaultCamelContext.doStop(DefaultCamelContext.java:1627)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102)[121:org.apache.camel.camel-core:2.10.7]
> 	at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.destroy(AbstractCamelContextFactoryBean.java:421)[173:org.apache.camel.camel-spring:2.10.7]
> 	at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:184)[111:org.springframework.beans:3.0.7.RELEASE]
> 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:487)[111:org.springframework.beans:3.0.7.RELEASE]
> 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:463)[111:org.springframework.beans:3.0.7.RELEASE]
> 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:431)[111:org.springframework.beans:3.0.7.RELEASE]
> 	at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1048)[113:org.springframework.context:3.0.7.RELEASE]
> 	at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.destroyBeans(AbstractOsgiBundleApplicationContext.java:204)[126:org.springframework.osgi.core:1.2.1]
> 	at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1022)[113:org.springframework.context:3.0.7.RELEASE]
> 	at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.doClose(AbstractOsgiBundleApplicationContext.java:197)[126:org.springframework.osgi.core:1.2.1]
> 	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$501(AbstractDelegatedExecutionApplicationContext.java:69)[126:org.springframework.osgi.core:1.2.1]
> 	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$2.run(AbstractDelegatedExecutionApplicationContext.java:214)[126:org.springframework.osgi.core:1.2.1]
> 	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[126:org.springframework.osgi.core:1.2.1]
> 	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.normalClose(AbstractDelegatedExecutionApplicationContext.java:210)[126:org.springframework.osgi.core:1.2.1]
> 	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.close(DependencyWaiterApplicationContextExecutor.java:374)[130:org.springframework.osgi.extender:1.2.1]
> 	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.doClose(AbstractDelegatedExecutionApplicationContext.java:236)[126:org.springframework.osgi.core:1.2.1]
> 	at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)[113:org.springframework.context:3.0.7.RELEASE]
> 	at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$1.run(ContextLoaderListener.java:522)[130:org.springframework.osgi.extender:1.2.1]
> 	at org.springframework.osgi.extender.internal.util.concurrent.RunnableTimedExecution$MonitoredRunnable.run(RunnableTimedExecution.java:60)[130:org.springframework.osgi.extender:1.2.1]
> 	at org.springframework.scheduling.timer.DelegatingTimerTask.run(DelegatingTimerTask.java:70)[113:org.springframework.context:3.0.7.RELEASE]
> 	at java.util.TimerThread.mainLoop(Timer.java:512)[:1.6.0_45]
> 	at java.util.TimerThread.run(Timer.java:462)[:1.6.0_45]
> Caused by: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating
bean with name 'eventsErrorHandler': Singleton bean creation not allowed while the singletons
of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy
method implementation!)
> 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:209)[111:org.springframework.beans:3.0.7.RELEASE]
> 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)[111:org.springframework.beans:3.0.7.RELEASE]
> 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)[111:org.springframework.beans:3.0.7.RELEASE]
> 	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)[113:org.springframework.context:3.0.7.RELEASE]
> 	at org.apache.camel.spring.spi.ApplicationContextRegistry.lookup(ApplicationContextRegistry.java:43)[173:org.apache.camel.camel-spring:2.10.7]
> 	at org.apache.camel.impl.CompositeRegistry.lookup(CompositeRegistry.java:51)[121:org.apache.camel.camel-core:2.10.7]
> 	... 42 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message