I am using an CXF DOSGi JAX-RS example
(http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest/).
This example contains two RESTful webservices, one with annotations and
another without.
I build it with maven and deploy it into Felix, together with CXF DOSGi
single bundle distribution. The one without annotations works fine, however
the other with annotations seems to be ignored at all. I get the following
message in the log:
WARNING: No resource methods have been found for resource class
org.apache.cxf.dosgi.samples.greeter.rest.GreeterService
Jun 15, 2011 10:34:17 PM org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean
checkResources
SEVERE: No resource classes found
Exception in thread "pool-1-thread-1"
org.apache.cxf.service.factory.ServiceConstructionException
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:122)
at
org.apache.cxf.dosgi.dsw.handlers.JaxRSPojoConfigurationTypeHandler.createServer(JaxRSPojoConfigurationTypeHandler.java:135)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.exportService(RemoteServiceAdminCore.java:244)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:78)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:71)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:71)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:40)
at
org.apache.cxf.dosgi.topologymanager.TopologyManager$2.run(TopologyManager.java:254)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.ws.rs.WebApplicationException
at
org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXRSFactoryBean.java:238)
at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:85)
... 11 more
--
View this message in context:
http://cxf.547215.n5.nabble.com/CXF-DOSGi-is-ignoring-JAX-RS-annotations-tp4495048p4495048.html
Sent from the cxf-user mailing list archive at Nabble.com.