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.1, 2.0-M1, 1.6.0
            Reporter: Willem Jiang
            Assignee: Willem Jiang
             Fix For: 1.6.2, 2.0.0


s...@root:/> osgi/refresh 120
s...@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.

Reply via email to