Hi,

I'm deploying a jaxws:endpoint in a bundle on Fuse 4.2 . The implementor
(notificationProducerService) is a service exposed in another bundle :

<jaxws:endpoint id="NotificationProducer"
implementor="#notificationProducerService"
address="http://localhost:8888/NotificationProducer";>
I get this exception :

2010-04-07 11:02:03.056 ERROR SpringOsgiExtenderThread-52
org.eclipse.osgi.framework.internal.core.BundleHost
edu.ucar.ral.wcsri.logging.internal.OsgiLogAdapter - Application context
refresh failed
(OsgiBundleXmlApplicationContext(bundle=edu.ucar.ral.wcsri.wcs-service,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'NotificationProducer': Invocation of init method failed; nested
exception is javax.xml.ws.WebServiceException: java.lang.ClassCastException:
$Proxy197 cannot be cast to org.springframework.aop.framework.Advised
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
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:637)
Caused by: javax.xml.ws.WebServiceException: java.lang.ClassCastException:
$Proxy197 cannot be cast to org.springframework.aop.framework.Advised
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:275)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:209)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:404)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 17 common frames omitted
Caused by: java.lang.ClassCastException: $Proxy197 cannot be cast to
org.springframework.aop.framework.Advised
at
org.apache.cxf.common.util.SpringAopClassHelper.getRealClassInternal(SpringAopClassHelper.java:43)
at org.apache.cxf.common.util.ClassHelper.getRealClass(ClassHelper.java:51)
at
org.apache.cxf.jaxws.EndpointImpl.getImplementorClass(EndpointImpl.java:178)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:289)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:259)
... 26 common frames omitted
Can I use an osgi service created in a different bundle as an implementor of
the web service endpoint ?

Thanks,

-Marcel
-- 
View this message in context: 
http://old.nabble.com/Problem-injecting-an-Osgi-service-as-the-implementor-of-the-jaxws%3Aendpoint-tp28168894p28168894.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to