[
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:
> <property name="org.apache.cxf.rs.provider"
> value="com.MyExceptionClassPath.TestExceptionMapper" />
> (Sergey suggested the following format - it does not solve my issue:
> <property name="org.apache.cxf.rs.provider">
> com.MyExceptionClassPath.TestExceptionMapper
> </property>
> )
> 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 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.