[
https://issues.apache.org/activemq/browse/SMXCOMP-820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63250#action_63250
]
Freeman Fang edited comment on SMXCOMP-820 at 11/10/10 9:37 PM:
----------------------------------------------------------------
Hi Kurt,
You're using 4.3.0-fuse-02-00 or 4.3.0-fuse-01-00?
If you're using 4.3.0-fuse-02-00, you should do like
<osgi:reference id="componentRegistry"
interface="org.apache.servicemix.jbi.runtime.ComponentRegistry"
cardinality="1..1" />
then reference it with proxy like
<cxfse:proxy service="person:PersonService" type="my.package.Person">
<property name="componentRegistry" ref="componentRegistry"/>
</cxfse:proxy>
This will inject componentRegistry to your cxf proxy directly(which won't turn
to jndi lookup), so you needn't rely on servicemix-cxf-se startup first.
The reference for servicemix-cxf-se is just a workaround for 4.3.0-fuse-01-00.
Freeman
was (Author: ffang):
Hi Kurt,
You're using 4.3.0-fuse-02-00 or 4.3.0-fuse-01-00?
If you're using 4.3.0-fuse-02-00, you should do like
<osgi:reference id="componentRegistry"
interface="org.apache.servicemix.jbi.runtime.ComponentRegistry"
cardinality="1..1" />
then reference it with proxy like
<cxfse:proxy service="person:PersonService" type="my.package.Person">
<property name="componentRegistry" ref="componentRegistry"/>
</cxfse:proxy>
This will inject componentRegistry to your cxf proxy directly(which won turn to
jndi lookup), so you needn't rely on servicemix-cxf-se startup first.
The reference for servicemix-cxf-se is just a workaround for 4.3.0-fuse-01-00.
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
> Assignee: Freeman Fang
>
> 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.