users@jersey.java.net

Re: [Jersey] how to catch 405 errors.

From: Diego Gil <diego.a.gil_at_gmail.com>
Date: Wed, 21 Apr 2010 15:53:30 -0300

On Wed, 2010-04-21 at 17:43 +0200, Paul Sandoz wrote:
> On Apr 21, 2010, at 5:35 PM, Diego Gil wrote:
>
> > Maybe the only thing we are missing is the registration of our
> > ExceptionMapper implementation, but I couldn't find how to do it.
> >
> > Any hint ?.
> >
>
> See here:
>
> https://jersey.dev.java.net/nonav/documentation/latest/user-
> guide.html#d4e217
>
> What is your web.xml?
>
> What is the package the ExceptionMapper is in? is it separate from the
> package that the resource classes are in?
>
> In you logs you should expect to see something like the following:
>
> INFO: Root resource classes found:
> class org.Foo
> Apr 21, 2010 5:27:07 PM com.sun.jersey.api.core.ScanningResourceConfig
> logClasses
> INFO: Provider classes found:
> class org.ExceptionMapper
>

ExceptionMapper was outside scanned package. We only needed to include
it in proper package. That was our fault.

With sample MyMapper you send us, now we catching too many exceptions.
Even unexpected ones. :-)

We are researching the origin of that and will come back if can't find
the solution.

Thanks you very much for excellent support!.

Regards,
Diego.