cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Williamson (JIRA)" <>
Subject [jira] Created: (DOSGI-87) Declarative Services not registering ExceptionMapper provider
Date Wed, 22 Dec 2010 23:52:02 GMT
Declarative Services not registering ExceptionMapper provider

                 Key: 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


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: 

  <property name="" 
value="com.MyExceptionClassPath.TestExceptionMapper" /> 

(Sergey suggested the following format - it does not solve my issue: 
   <property name=""> 

The class TestExceptionMapper is defined with the following signature and 
default method: 

  package com.MyExceptionClassPath; 
  public class TestExceptionMapper implements 
ExceptionMapper<MyCustomException> { 
     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,
an element of instance ComponentInstanceImpl has a hashtable
entry for provider TestMapperException.  Not sure where to go from here. 

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.

View raw message