You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2009/06/11 15:31:35 UTC

[jira] Resolved: (CAMEL-1696) Refreshing a bundle with a camel-cxf route gives exception 'BeanFactory not initialized or already closed

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

Willem Jiang resolved CAMEL-1696.
---------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.0.0)
                   2.0-M2

Clean up the BunFactory's default bus factory when the application context is stopped.
trunk
http://svn.apache.org/viewvc?rev=783743&view=rev
camel-1.x 
http://svn.apache.org/viewvc?rev=783745&view=rev

> Refreshing a bundle with a camel-cxf route gives exception 'BeanFactory not initialized or already closed
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1696
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1696
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.6.0, 2.0-M1, 1.6.1
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>             Fix For: 1.6.2, 2.0-M2
>
>
> smx@root:/> osgi/refresh 120
> smx@root:/> Exception in thread "SpringOsgiExtenderThread-16" org.springframework.beans.factory.BeanCreationException: E
> rror creating bean with name 'illustrationGenerationEndpoint': Initialization of bean failed; nested exception is java.l
> ang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the
> ApplicationContext
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCap
> ableBeanFactory.java:480)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBea
> nFactory.java:409)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
> leBeanFactory.java:380)
> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegis
> try.java:222)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
> at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListable
> BeanFactory.java:429)
> at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplic
> ationContext.java:728)
> at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDel
> egatedExecutionApplicationContext.java:68)
> at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegated
> ExecutionApplicationContext.java:343)
> at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
> at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(Abstrac
> tDelegatedExecutionApplicationContext.java:308)
> at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$Co
> mpleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:138)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before access
> ing beans via the ApplicationContext
> at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableA
> pplicationContext.java:153)
> at org.springframework.context.support.AbstractApplicationContext.getBeanDefinitionNames(AbstractApplicationCont
> ext.java:929)
> at org.apache.cxf.configuration.spring.ConfigurerImpl.initWildcardDefinitionMap(ConfigurerImpl.java:77)
> at org.apache.cxf.configuration.spring.ConfigurerImpl.addApplicationContext(ConfigurerImpl.java:223)
> at org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor.updateBusReferencesInContext(BusWiringBeanFactory
> PostProcessor.java:118)
> at org.apache.camel.component.cxf.spring.CxfEndpointBeanDefinitionParser$CxfSpringEndpointBean.setApplicationCon
> text(CxfEndpointBeanDefinitionParser.java:115)
> at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(Applicat
> ionContextAwareProcessor.java:70)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeIni
> tialization(AbstractAutowireCapableBeanFactory.java:350)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireC
> apableBeanFactory.java:1331)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCap
> ableBeanFactory.java:473)
> ... 16 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.