Thanks.

So I have some kind of misunderstanding about DOSGi CXF's exception
handling.

My scenario is the following:
I created a simple client-server architecture, where both client and server
components run on Equinox and the communication is based on DOSGi CXF. The
webservices worked fine, then I decided to put some exception-handling into
the application. I subclassed java.lang.Exception to create a common
exception for my app, then subclassed that exception for specific
exceptions.  Of course both client and server bundles use these exceptions,
as I put them into the interface bundle.

Then I wanted to test the exceptions: the client called the server side
service operation, which threw my specific exception, but it was wrapped in
the following exceptions:

java.lang.reflect.UndeclaredThrowableException /
java.lang.reflect.InvocationTargetException /
org.osgi.framework.ServiceException /
java.lang.reflect.InvocationTargetException / MySpecificException

And here comes my question: Is this wrapping provided by the CXF DOSGi
runtime? I mean is this the way it should work? If so, how could I catch
this exception nicely on the client side? In nicely I mean that so far the
only way I figured out was having a catch block for UndeclaredThrowable (or
Exception.. :)), which just makes having custom exceptions useless :) And
naturally, my IDE (Eclipse) wants the custom exception to be catched..

I tried to make my application exception by subclassing
InvocationTargetException, but didnt work the way I wanted.

So I am a bit confused, I hope someone can clarify my issue.

Thanks in advance,
András Liter

On Sat, Sep 24, 2011 at 7:20 PM, Glen Mazza <glen.ma...@gmail.com> wrote:

> Feel free to ask your questions here.
>
> Glen
>
>
> On 09/24/2011 06:49 AM, András Liter wrote:
>
>> Dear CXF Users,
>>
>>
>>
>> I wonder if there is a separate mailing list for the CXF-DOSGI subproject,
>> or can I write my question regarding CXF-DOSGI here?
>>
>>
>>
>> Thank you,
>>
>> András Liter
>>
>>
>
> --
> Glen Mazza
> Talend - http://www.talend.com/ai
> Blog - http://www.jroller.com/gmazza
> Twitter - glenmazza
>
>

Reply via email to