Hi,

For SMX4.x (OSGi container), you shouldn't put context="context" for cxfse:proxy, the proxy will create it automatically for you, SMXCOMP-683[1] track this issue.
You should use latest released SMX4.2 to use this new feature.

[1]https://issues.apache.org/activemq/browse/SMXCOMP-683

Freeman
On 2010-6-7, at 上午7:13, Amigo_ wrote:


I've updated a little my bundle-context.xml, so that I configured proxy for
cxfse:

<cxfse:endpoint>
        <cxfse:pojo>
                <bean class="com.amigo.cxf.TranslatorClient">   
                        <property name="gtPort">
                                <cxfse:proxy service="Translator_Service" 
context="#context"
                                        type="com.amigo.cxf.Translator" />
                        </property>
                </bean>
        </cxfse:pojo>
</cxfse:endpoint>

But now I got following error about "No bean named 'context' is defined":

Exception in thread "SpringOsgiExtenderThread-77"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.servicemix.cxfse.CxfSeEndpoint#0' defined in URL
[bundleentry://178.fwk31983818/META-INF/spring/bundle-context.xml]: Cannot
create inner bean 'com.amigo.cxf.TranslatorClient#0' of type
[com.amigo.cxf.TranslatorClient] while setting bean property 'pojo'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.amigo.cxf.TranslatorClient#0' defined in URL [bundleentry://178.fwk31983818/META-INF/spring/bundle-context.xml]: Cannot
create inner bean 'cxfse:proxy#113fcac' of type
[org.apache.servicemix.cxfse.CxfSeProxyFactoryBean] while setting bean
property 'gtPort'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'cxfse:proxy#113fcac' defined in URL
[bundleentry://178.fwk31983818/META-INF/spring/bundle-context.xml]: Cannot resolve reference to bean 'context' while setting bean property 'context';
nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'context' is defined
        at
org .springframework .beans .factory .support .BeanDefinitionValueResolver .resolveInnerBean(BeanDefinitionValueResolver.java:230)
        at
org .springframework .beans .factory .support .BeanDefinitionValueResolver .resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
        at
org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
        at
org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .populateBean(AbstractAutowireCapableBeanFactory.java:1010)
        at
org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
        at
org .springframework .beans.factory.support.AbstractAutowireCapableBeanFactory $1.run(AbstractAutowireCapableBeanFactory.java:409)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .createBean(AbstractAutowireCapableBeanFactory.java:380)
        at
org.springframework.beans.factory.support.AbstractBeanFactory $1.getObject(AbstractBeanFactory.java:264)
        at
org .springframework .beans .factory .support .DefaultSingletonBeanRegistry .getSingleton(DefaultSingletonBeanRegistry.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(DefaultListableBeanFactory.java:429)
        at
org .springframework .context .support .AbstractApplicationContext .finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
        at
org .springframework .osgi .context.support.AbstractDelegatedExecutionApplicationContext.access $1600(AbstractDelegatedExecutionApplicationContext.java:69)
        at
org .springframework .osgi.context.support.AbstractDelegatedExecutionApplicationContext $4.run(AbstractDelegatedExecutionApplicationContext.java:355)
        at
org .springframework .osgi .util .internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java: 85)
        at
org .springframework .osgi .context .support .AbstractDelegatedExecutionApplicationContext .completeRefresh(AbstractDelegatedExecutionApplicationContext.java: 320)
        at
org .springframework .osgi .extender .internal .dependencies.startup.DependencyWaiterApplicationContextExecutor $ CompleteRefreshTask .run(DependencyWaiterApplicationContextExecutor.java:136)
        at java.lang.Thread.run(Thread.java:636)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.amigo.cxf.TranslatorClient#0' defined in URL [bundleentry://178.fwk31983818/META-INF/spring/bundle-context.xml]: Cannot
create inner bean 'cxfse:proxy#113fcac' of type
[org.apache.servicemix.cxfse.CxfSeProxyFactoryBean] while setting bean
property 'gtPort'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'cxfse:proxy#113fcac' defined in URL
[bundleentry://178.fwk31983818/META-INF/spring/bundle-context.xml]: Cannot resolve reference to bean 'context' while setting bean property 'context';
nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'context' is defined
        at
org .springframework .beans .factory .support .BeanDefinitionValueResolver .resolveInnerBean(BeanDefinitionValueResolver.java:230)
        at
org .springframework .beans .factory .support .BeanDefinitionValueResolver .resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
        at
org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
        at
org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .populateBean(AbstractAutowireCapableBeanFactory.java:1010)
        at
org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
        at
org .springframework .beans.factory.support.AbstractAutowireCapableBeanFactory $1.run(AbstractAutowireCapableBeanFactory.java:409)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .createBean(AbstractAutowireCapableBeanFactory.java:380)
        at
org .springframework .beans .factory .support .BeanDefinitionValueResolver .resolveInnerBean(BeanDefinitionValueResolver.java:219)
        ... 20 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'cxfse:proxy#113fcac' defined in URL
[bundleentry://178.fwk31983818/META-INF/spring/bundle-context.xml]: Cannot resolve reference to bean 'context' while setting bean property 'context';
nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'context' is defined
        at
org .springframework .beans .factory .support .BeanDefinitionValueResolver .resolveReference(BeanDefinitionValueResolver.java:275)
        at
org .springframework .beans .factory .support .BeanDefinitionValueResolver .resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
        at
org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
        at
org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .populateBean(AbstractAutowireCapableBeanFactory.java:1010)
        at
org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
        at
org .springframework .beans.factory.support.AbstractAutowireCapableBeanFactory $1.run(AbstractAutowireCapableBeanFactory.java:409)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org .springframework .beans .factory .support .AbstractAutowireCapableBeanFactory .createBean(AbstractAutowireCapableBeanFactory.java:380)
        at
org .springframework .beans .factory .support .BeanDefinitionValueResolver .resolveInnerBean(BeanDefinitionValueResolver.java:219)
        ... 28 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
No bean named 'context' is defined
        at
org .springframework .beans .factory .support .DefaultListableBeanFactory .getBeanDefinition(DefaultListableBeanFactory.java:387)
        at
org .springframework .beans .factory .support .AbstractBeanFactory .getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)
        at
org .springframework .beans .factory .support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)
        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 .BeanDefinitionValueResolver .resolveReference(BeanDefinitionValueResolver.java:269)
        ... 36 more



--
View this message in context: 
http://old.nabble.com/Invoking-external-web-service-from-SE-tp28722871p28793594.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.



--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com

Reply via email to