users@jersey.java.net

Re: [Jersey] ExceptionMapper class not working

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 30 Jun 2009 08:16:15 +0200

Hi,

Can you send me the code of you ExceptionMapper to help me reproduce
the issue?

Paul.

On Jun 30, 2009, at 12:30 AM, Chirag Desai wrote:

> Hi,
>
> I am trying to write ExceptionMapper provider in Jersey 1.0 by
> implementing Mapper interface.
>
> It compiles fine and at runtime I see Jersey is able to recognize
> this provider.
>
> However I see runtime error from Jersey when my application tries to
> throw this Exception (for which
> this mapper provider exists).
>
> It runs into following exception :
> ========================
>
> java.lang.AbstractMethodError:
> provider.RestExceptionMapperProvider.toResponse(Ljava/lang/Throwable;
> )Ljavax/ws/rs/core/Response;
> <197>Jun 29 14:47:59 1 tomcat: INFO tomcat server output at
> com.sun.jersey.impl.application.WebApplicationImpl.mapExceptio
> n(WebApplicationImpl.java:977)
> <197>Jun 29 14:47:59 1 tomcat: INFO tomcat server output at
> com.sun.jersey.impl.application.WebApplicationImpl.handleReque
> st(WebApplicationImpl.java:728)
> <197>Jun 29 14:47:59 1 tomcat: INFO tomcat server output at
> com.sun.jersey.impl.application.WebApplicationImpl.handleReque
> st(WebApplicationImpl.java:692)
>
> ============================
>
> I am running it with Sun JVM 1.5
>
> Any idea what could be wrong here ?
>
> Thanks,
> Chirag
>
> Get easy photo sharing with Windows LiveT Photos. Drag n' drop