Hi Alex On Tue, Sep 6, 2011 at 10:13 PM, Alex Porras <[email protected]> wrote: > On Tue, Sep 6, 2011 at 4:12 PM, Alex Porras <[email protected]> wrote: > >> What is happening is that when FooException is thrown in the >> application, it is being handled by BarExceptionMapper. > > I believe I have found the solution. Despite the child exception > mappers specifying a generic type required by the parent (abstract) > exception mapper (which implements ExceptionMapper), each child class > also needs to include a "implements ExceptionMapper<T>" declaration, > to prevent CXF from bubbling up to the base interface implementation > declaration and using that class's generic type. > > Thus, my exception mapper hierarchy is now: > > (abstract) BaseRuntimeExceptionMapper <T extends BaseRuntimeException> > FooExceptionMapper extends BaseRuntimeExceptionMapper<FooException> > implements ExceptionMapper<FooException> > BarExceptionMapper extends > BaseRuntimeExceptionMapper<BarException>implements > ExceptionMapper<BarException> > > This seems a little repetitive, but I think it makes sense given the > route that CXF seems to be using to determine the exception type. >
I think that has to be improved on the CXF side - I'll try to get to it asap thanks, Sergey > Hope this helps someone else! > > Alex > -- Sergey Beryozkin http://sberyozkin.blogspot.com Talend - http://www.talend.com
