Hi,

It's a known issue and already get fixed.
Please see the related discussion[1], you can remove Ws-Discovery module for 
now as workaround

[1]http://cxf.547215.n5.nabble.com/jax-rs-server-problems-td5721786.html
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

On 2013-1-25, at 下午5:15, Nishant Chandra wrote:

> I am using CXF v 2.7.2, Spring 3.1.2.
> 
> A REST endpoint is declared:
> 
> <jaxrs:server id="healthCheckService" address="/healthCheck">
>       <jaxrs:serviceBeans>
>               <ref bean="healthCheck" />
>       </jaxrs:serviceBeans>
> </jaxrs:server>
> 
> Getting this NPE exception:
> 
> SEVERE: Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'he
> althCheckService': Invocation of init method failed; nested exception
> is org.apache.cxf.se
> rvice.factory.ServiceConstructionException
>        at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.in
> itializeBean(AbstractAutowireCapableBeanFactory.java:1455)
>        at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.do
> CreateBean(AbstractAutowireCapableBeanFactory.java:519)
>        at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.cr
> eateBean(AbstractAutowireCapableBeanFactory.java:456)
>        at 
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(Abstr
> actBeanFactory.java:294)
> 
> ....
> Caused by: org.apache.cxf.service.factory.ServiceConstructionException
>        at 
> org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:
> 201)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
> va:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.in
> vokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
>        at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.in
> vokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
>        at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.in
> itializeBean(AbstractAutowireCapableBeanFactory.java:1452)
>        ... 26 more
> Caused by: java.lang.NullPointerException
>        at 
> org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.getServiceQName
> (WSDiscoveryServerListener.java:89)
>        at 
> org.apache.cxf.ws.discovery.listeners.WSDiscoveryServerListener.startServer(WSD
> iscoveryServerListener.java:68)
>        at 
> org.apache.cxf.bus.managers.ServerLifeCycleManagerImpl.startServer(ServerLifeCy
> cleManagerImpl.java:61)
>        at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:146)
>        at 
> org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:
> 192)
> 
> How can I fix this?
> 
> Thanks,
> Nishant

Reply via email to