Return-Path: X-Original-To: apmail-cxf-users-archive@www.apache.org Delivered-To: apmail-cxf-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9460B6B1A for ; Thu, 16 Jun 2011 14:32:28 +0000 (UTC) Received: (qmail 3661 invoked by uid 500); 16 Jun 2011 14:32:27 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 3613 invoked by uid 500); 16 Jun 2011 14:32:27 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 3604 invoked by uid 99); 16 Jun 2011 14:32:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2011 14:32:27 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sberyozkin@gmail.com designates 209.85.214.41 as permitted sender) Received: from [209.85.214.41] (HELO mail-bw0-f41.google.com) (209.85.214.41) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jun 2011 14:32:23 +0000 Received: by bwz17 with SMTP id 17so1717451bwz.0 for ; Thu, 16 Jun 2011 07:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=bxpUlbk/8R3Z+GihM/rBEabtgCBS3jgWsF9iOoqt6ok=; b=RMDsxPvlft0xZICQllYzwLxPyXqQ1t9f8S58yRusKAdHWu6VkIRCOEDbkgWZPMg3F+ lqI78dbdoPn5QlTx/y/4DZA53PB8sC8ZvTKIb81g9ZO/AKsm4RHcB/kK1YMnbHurzBab h1r98OzncPgb7tru+fJKgfYiKXOdsc7T6Va70= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=wtPPhVGU1FeKcyqsuFuu+YSYUvxbfH6tex6Apv77rTeg9X1HHxwxFBpY/V9WHSqfvm iF3c+ZxY53PfVM4nPBXTnnC6OcqtFi0UxeaWiRNZrmlnVgEySJgPdW2q+O1xV23FhVj7 gHdlkckpLHRj+gUvP6hVT6tcuDH2Q7XTVWJX8= MIME-Version: 1.0 Received: by 10.204.74.21 with SMTP id s21mr738778bkj.62.1308234721848; Thu, 16 Jun 2011 07:32:01 -0700 (PDT) Received: by 10.204.100.12 with HTTP; Thu, 16 Jun 2011 07:32:01 -0700 (PDT) In-Reply-To: <1308230610816-4495048.post@n5.nabble.com> References: <1308230610816-4495048.post@n5.nabble.com> Date: Thu, 16 Jun 2011 15:32:01 +0100 Message-ID: Subject: Re: CXF DOSGi is ignoring JAX-RS annotations? From: Sergey Beryozkin To: users@cxf.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I think it's a matter of explicitly importing javax.ws.rs package with ImportPackage for the case where annotations are expected to be recognized Cheers, Sergey On Thu, Jun 16, 2011 at 2:23 PM, mah wrote: > 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, howev= er > the other with annotations seems to be ignored at all. I get the followin= g > 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 > =A0 =A0 =A0 =A0at > org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean= .java:122) > =A0 =A0 =A0 =A0at > org.apache.cxf.dosgi.dsw.handlers.JaxRSPojoConfigurationTypeHandler.creat= eServer(JaxRSPojoConfigurationTypeHandler.java:135) > =A0 =A0 =A0 =A0at > org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.exportService(Rem= oteServiceAdminCore.java:244) > =A0 =A0 =A0 =A0at > org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteS= erviceAdminInstance.java:78) > =A0 =A0 =A0 =A0at > org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteS= erviceAdminInstance.java:71) > =A0 =A0 =A0 =A0at java.security.AccessController.doPrivileged(Native Meth= od) > =A0 =A0 =A0 =A0at > org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService= (RemoteServiceAdminInstance.java:71) > =A0 =A0 =A0 =A0at > org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService= (RemoteServiceAdminInstance.java:40) > =A0 =A0 =A0 =A0at > org.apache.cxf.dosgi.topologymanager.TopologyManager$2.run(TopologyManage= r.java:254) > =A0 =A0 =A0 =A0at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(= Unknown > Source) > =A0 =A0 =A0 =A0at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unkn= own > Source) > =A0 =A0 =A0 =A0at java.lang.Thread.run(Unknown Source) > Caused by: javax.ws.rs.WebApplicationException > =A0 =A0 =A0 =A0at > org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXR= SFactoryBean.java:238) > =A0 =A0 =A0 =A0at > org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean= .java:85) > =A0 =A0 =A0 =A0... 11 more > > > > -- > View this message in context: http://cxf.547215.n5.nabble.com/CXF-DOSGi-i= s-ignoring-JAX-RS-annotations-tp4495048p4495048.html > Sent from the cxf-user mailing list archive at Nabble.com. --=20 Sergey Beryozkin Application Integration Division of Talend http://sberyozkin.blogspot.com