Any chance you could create a small "hello world" app that shows the issue and attach to a JIRA. That would really be helpful.
That said, you MAY be able to get it to work if you turn on the Spring based processing of the @Resource/@PostConstruct annotations. I think just adding: <bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor"/> or: <context:annotation-config/> might work. Not really sure though. In that case, Spring may call the proper methods at the appropriate time as needed. Since spring is handling it, it may work with the internal beans and stuff that we wouldn't have access to. Dan On Fri May 1 2009 5:32:08 pm Karthik Abram wrote: > Hi, > > I'm using CXF 2.2.1 with Spring 2.5.6 and would like to use > @Aspect driven aspects which requires adding > > > > <aop:aspect-autoproxy/> to the spring configuration file. > > > > However, as soon as I add this, I get errors in creating jaxws:endpoint > definitions (even if I use implementor, implementorClass technique). It > looks like with the Aspectj 1.6.2 technique, DestinationFactoryManager > never gets setup right. In particular, the invokePostConstruct() method > isn't able to get any method with @PostConstruct because the proxy doesn't > have the @PostConstruct annotation and down the line I get an exception > with a stack trace such as: (abbreviated stack trace below). I know the > aspect-autoproxy tag causes Spring to proxy every single bean it manages > (when raised as an issue, Spring team has not been favorably disposed to > address this). I can't be the first person to have run into this. Can > anyone help? > > > > > > 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:3 >9 ) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp >l .java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor >y .invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414) > > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor >y .invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375) > > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor >y .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(Abs >t ractWSDLBasedEndpointFactory.java:146) > > at > org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:117 >) > > at > org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.j >a va:168) > > at > org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:346) > > at > org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:259) -- Daniel Kulp [email protected] http://www.dankulp.com/blog
