Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 47929 invoked from network); 4 Jan 2011 23:25:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Jan 2011 23:25:08 -0000 Received: (qmail 6960 invoked by uid 500); 4 Jan 2011 23:25:08 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 6892 invoked by uid 500); 4 Jan 2011 23:25:07 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 6880 invoked by uid 99); 4 Jan 2011 23:25:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 23:25:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 23:25:06 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p04NOjNZ014221 for ; Tue, 4 Jan 2011 23:24:46 GMT Message-ID: <1573782.147531294183485954.JavaMail.jira@thor> Date: Tue, 4 Jan 2011 18:24:45 -0500 (EST) From: "Ian Williamson (JIRA)" To: issues@cxf.apache.org Subject: [jira] Updated: (DOSGI-87) Declarative Services not registering ExceptionMapper provider In-Reply-To: <21688917.279911293061922399.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DOSGI-87?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ian Williamson updated DOSGI-87: -------------------------------- Attachment: DS_Provider.zip The .zip contains a working example of the failure of the ExceptionMapper to register. There are a client and server bundle. The other bundles in use when this example was created are: org.eclipse.osgi_3.5.1.R35x_v20090827 org.eclipse.osgi.services_3.2.0.v20090520-1800 org.eclipse.equinox.util_1.0.100.v20090520-1800 org.eclipse.equinox.ds_1.1.0.v20090601 org.apache.servicemix.specs.jsr311-api-1.0_1.3.0 > Declarative Services not registering ExceptionMapper provider > ------------------------------------------------------------- > > Key: DOSGI-87 > URL: https://issues.apache.org/jira/browse/DOSGI-87 > Project: CXF Distributed OSGi > Issue Type: Bug > Components: DSW > Affects Versions: 1.1 > Environment: D-OSGi 1.1, Equinox 3.5, Windows XP > Reporter: Ian Williamson > Attachments: DS_Provider.zip > > > Greetings, > I am attempting to setup a custom exception handler through CXF-DOSGi using > Declarative Services to register my provider. > My endpoints registration file (for REST) declares the following: > value="com.MyExceptionClassPath.TestExceptionMapper" /> > (Sergey suggested the following format - it does not solve my issue: > > com.MyExceptionClassPath.TestExceptionMapper > > ) > The class TestExceptionMapper is defined with the following signature and > default method: > package com.MyExceptionClassPath; > public class TestExceptionMapper implements > ExceptionMapper { > public Response toResponse(MyCustomException arg0) { > return Response.status(Response.Status.FORBIDDEN).build(); > } > } > I am using SoapUI to call into my web service and I am trying a test of the > custom exception provider by simply calling: > throw new MyCustomException(); > I have a breakpoint set at TestExceptionMapper.toResponse(), but it is never > hit. Instead, the execution stack just falls through MyCustomException. > Tracing to ServiceComponent.createInstance(), I see that during a subsequent call to ServiceComponentProp.build(), an element of instance ComponentInstanceImpl has a ServiceComponentProp.properties hashtable entry for provider TestMapperException. Not sure where to go from here. > I have attached a sample bundle. It is bare bones but should be able to convey what I am attempting. > I must add a common caveat. This is all extremely new to me, so any > responsdor needs to understand that I do not have a deep background (working > on it) in this technological field. > Thanks for any forthcoming assistance. > Cheers, Ian -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.