BTW, this code runs inside OSGi. Regards Raman
From: Malisetti, Ramanjaneyulu Sent: Wednesday, November 21, 2012 7:55 PM To: [email protected] Subject: problem with publishing JAX-RS endpoint using 2.7 Hi, We are updating CXF stack from 2.5.2 to 2.7. The following code used to work in 2.3.0 but fails with the following exception. Is there anything wrong with this code? public class ResourcesProvider { public ResourcesProvider() { try { JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean(); factory.setServiceBean(this); String endpointURL = "http://0.0.0.0:8000/sample" factory.setAddress(endpointURL); factory.create(); } catch (Exception ex) { logger.error("Unable to start @ : ", ex); } @GET @Path("/serv1") Public method1() { } @GET @Path("/serv2") Public method2() { } @GET @Path("/serv3") Public method3() { } } Caused by: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:201) at com.ca.ucf.remote.ResourcesProvider.start(ResourcesProvider.java:82) ... 31 more Caused by: javax.ws.rs.WebApplicationException at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXRSFactoryBean.java:315) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:148) ... 32 more
