[
https://issues.apache.org/activemq/browse/SMXCOMP-820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63245#action_63245
]
Freeman Fang commented on SMXCOMP-820:
--------------------------------------
Hi Kurt,
Are you using the latest 4.3.0-fuse-02-00 release?
If so, I think SMXCOMP-803[1] already fix this issue, you just need inject
componentRegistry to your cxf proxy like
<property name="componentRegistry" ref="componentRegistry"/>
You can get more details from SMXCOMP-803 comments.
SMXCOMP-803 fix a issue caused by bundle start sequence, which means your cxf
proxy bundle needn't rely on servicemix-cxf-se bundle start firstly, otherwise
you'll see the error you posted above, this is a usual scenario when you
restart smx container, there's no guarantee that servicemix-cxf-se bundle
always start before your cxf proxy bundle.
If you're using 4.3.0-fuse-01-00, you can add
<osgi:reference id="servicemix-cxf-se" interface="javax.jbi.component.Component"
cardinality="1..1" filter="(NAME=servicemix-cxf-se)" />
to your cxf proxy bundle configuration as workaround, which will hold a
reference for servicemix-cxf-se OSGi service, this way can ensure that
servicemix-cxf-se bundle before your cxf proxy bundle.
Let me know what is your case and if my comment works for you
[1]https://issues.apache.org/activemq/browse/SMXCOMP-803
Cheers
Freeman
> Services based on servicemix-cxf-se with proxy on smx4/osgi cannot initialize
> -----------------------------------------------------------------------------
>
> Key: SMXCOMP-820
> URL: https://issues.apache.org/activemq/browse/SMXCOMP-820
> Project: ServiceMix Components
> Issue Type: Bug
> Components: servicemix-cxf-se
> Affects Versions: servicemix-xmpp-2010.01
> Environment: fuse-esb 4.3
> Reporter: Kurt Westerfeld
>
> Our servicemix-cxf-se components use the proxy feature, and are unable to
> start when servicemix is restarted. The are receiving an exception I will
> paste below.
> What looks to be happening is that the
> org.apache.servicemix.cxfse.CxfSeProxyFactoryBean is unable to use the
> injected component context, and falls into a bit of code that is normally not
> executed, related to finding its client factory using JNDI
> (java:comp/env/jbi/ClientFactory). If I set a breakpoint on this code, and
> unwind the stack one method, I can single step this code and all works fine.
> So, it looks like a startup timing issue to me. Comments in the code lead me
> to believe that under OSGi this should never happen.
> 10:25:14,070 | ERROR | xtenderThread-20 | ContextLoaderListener |
> BundleApplicationContextListener 50 | 73 -
> org.springframework.osgi.extender - 1.2.0 | Application context refresh
> failed (OsgiBundleXmlApplicationContext(bundle=merge-service,
> config=osgibundle:/META-INF/spring/*.xml))
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.servicemix.cxfse.CxfSeEndpoint#0' defined in URL
> [bundleentry://224.fwk20591791/META-INF/spring/beans.xml]: Cannot create
> inner bean 'com.novell.soa.ccm.merge.impl.MergeService#0' of type
> [com.novell.soa.ccm.merge.impl.MergeService] while setting bean property
> 'pojo'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'com.novell.soa.ccm.merge.impl.MergeService#0' defined in URL
> [bundleentry://224.fwk20591791/META-INF/spring/beans.xml]: Cannot create
> inner bean 'cxfse:proxy#13a5041' of type
> [org.apache.servicemix.cxfse.CxfSeProxyFactoryBean] while setting bean
> property 'web2Connect'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'cxfse:proxy#13a5041': FactoryBean threw exception on object
> creation; nested exception is javax.naming.NotContextException:
> java:comp/env/jbi/ClientFactory
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)[62:org.springframework.context:3.0.3.RELEASE]
> at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[72:org.springframework.osgi.core:1.2.0]
> at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[72:org.springframework.osgi.core:1.2.0]
> at
> org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[72:org.springframework.osgi.core:1.2.0]
> at
> org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[72:org.springframework.osgi.core:1.2.0]
> at
> org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)[73:org.springframework.osgi.extender:1.2.0]
> at java.lang.Thread.run(Thread.java:619)[:1.6.0_18]
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'com.novell.soa.ccm.merge.impl.MergeService#0'
> defined in URL [bundleentry://224.fwk20591791/META-INF/spring/beans.xml]:
> Cannot create inner bean 'cxfse:proxy#13a5041' of type
> [org.apache.servicemix.cxfse.CxfSeProxyFactoryBean] while setting bean
> property 'web2Connect'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'cxfse:proxy#13a5041': FactoryBean threw exception on object
> creation; nested exception is javax.naming.NotContextException:
> java:comp/env/jbi/ClientFactory
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)[60:org.springframework.beans:3.0.3.RELEASE]
> ... 17 more
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'cxfse:proxy#13a5041': FactoryBean threw exception on
> object creation; nested exception is javax.naming.NotContextException:
> java:comp/env/jbi/ClientFactory
> at
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:109)[60:org.springframework.beans:3.0.3.RELEASE]
> at
> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:274)[60:org.springframework.beans:3.0.3.RELEASE]
> ... 23 more
> Caused by: javax.naming.NotContextException: java:comp/env/jbi/ClientFactory
> at
> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java:171)[77:org.apache.servicemix.naming:1.3.0.fuse-01-00]
> at
> org.apache.xbean.naming.context.AbstractContext.lookup(AbstractContext.java:611)[77:org.apache.servicemix.naming:1.3.0.fuse-01-00]
> at
> org.apache.servicemix.naming.InitialContextWrapper.lookup(InitialContextWrapper.java:173)[77:org.apache.servicemix.naming:1.3.0.fuse-01-00]
> at
> javax.naming.InitialContext.lookup(InitialContext.java:392)[:1.6.0_18]
> at
> org.apache.servicemix.cxfse.CxfSeProxyFactoryBean.getInternalContext(CxfSeProxyFactoryBean.java:186)[154:servicemix-cxf-se:2010.02.0.fuse-01-00]
> at
> org.apache.servicemix.cxfse.CxfSeProxyFactoryBean.createProxy(CxfSeProxyFactoryBean.java:110)[154:servicemix-cxf-se:2010.02.0.fuse-01-00]
> at
> org.apache.servicemix.cxfse.CxfSeProxyFactoryBean.getObject(CxfSeProxyFactoryBean.java:94)[154:servicemix-cxf-se:2010.02.0.fuse-01-00]
> at
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)[60:org.springframework.beans:3.0.3.RELEASE]
> ... 25 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.