cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karthik Abram" <karthik.ab...@neovera.com>
Subject Problem using CXF with Spring 2.5 and aspectj-autoproxy
Date Mon, 04 May 2009 15:02:07 GMT
Hello,

                I posted this to the user mailing list but I want to post
this here as well for your input.

 

I have CXF 2.2.1 based web services using Spring 2.5.6 and would like to use
@Aspect driven aspects. To enable this, I added the <aop:aspect-autoproxy/>
tag to my configuration. Well, this severely broke the CXF functionality
throwing exceptions as shown below. Stepping through the code I found that
the issue is in the ResourceInjector.java class in the getAnnotatedMethods()
implementation as this is not proxy aware and JDK proxies don't retain
annotation information (which think is a major flaw in the jdk proxy
implementation). Unfortunately, Spring's implementation of
<aop:aspectj-autoproxy/> tag proxies every single bean. I tried to force the
use of CGLIB proxies, but for some reason Spring reverts to jdk proxy
creation and the same exceptions follow. I can't imagine I'm the first to
run into this so any help you can provide is greatly appreciated.

 

Exception:

 

 

Caused by: javax.xml.ws.WebServiceException: java.lang.NullPointerException

                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)

                ... 39 more

Caused by: java.lang.NullPointerException

                At
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(

AbstractWSDLBasedEndpointFactory.java:240)

                at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abst
ractWSDLBasedEndpointFactory.java:146)

                at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:117)

                at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.ja

va:168)

 

                at

org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:346)

 

                at

org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:259)

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message