users@jersey.java.net

Re: [Jersey] exception mapping

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 29 Jun 2009 09:15:33 +0200

Hi Ross,

How did you register you custom exception mapper ?

I suspect that your exception mapper is not being registered. You
register it by annotating with @Provider and then use the same
registration mechanism as you do for root resource classes.

What is your web.xml?

Paul.

On Jun 26, 2009, at 10:08 PM, Ross Mcdonald wrote:

> Hi.
>
> I have created a custom exception, response and mapper, attempting
> to map the two together.
> I hoped to see my resource method throw an exception of the newly
> specified type, and return my new custom response.
> Instead I see a servlet container html based error 500. I am using
> maven and the jetty plugin to run my app.
> Is there any config I should put in my web.xml to wire this up ?
>
> Thanks in advance for your help,
>
> regards,
>
> -- Ross
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>