users@jersey.java.net

[Jersey] Re: Nullpointer and IllegalExpcetion are not handled by ExceptionMapper Jersey 1.4

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Thu, 08 Mar 2012 18:30:34 +0100

Hi, seems that your exception mapper is throwing another NPE when trying to map the initial NPE to a response. Please
try to debug your custom exception mapper code.

Marek

On 03/08/2012 05:19 PM, Albert wrote:
> Hi
> I read many threads at jersey and it is listed as bug in jersey 1.1.5. Is it
> fixed letter on?
> I am using Jersey 1.4 and Exception mapper is not working for nullpointer
> and Illegal Argument exception. I made Exception Mapper on runetimeException
> but it gives below error. Any idea how it can be solved.
>
> Signature.
> public class NullPointerExceptionMapper implements
> ExceptionMapper<RuntimeException> {
>
>
> EVERE: Exception mapper
> edu.apollogrp.platform.authz.rest.provider.NullPointerE
> xceptionMapper_at_5fbbf3 for Throwable java.lang.NullPointerException threw a
> Runti
> meException when attempting to obtain the response
> Mar 8, 2012 9:09:16 AM com.sun.jersey.spi.container.ContainerResponse
> traceExcep
> tion
> SEVERE: Mapped exception to response: 500 (Internal Server Error)
> java.lang.NullPointerException
> at
> edu.apollogrp.platform.authz.rest.provider.NullPointerExceptionMapper
> .toResponse(NullPointerExceptionMapper.java:23)
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Nullpointer-and-IllegalExpcetion-are-not-handled-by-ExceptionMapper-Jersey-1-4-tp7355433p7355433.html
> Sent from the Jersey mailing list archive at Nabble.com.