dev@jersey.java.net

Re: [Jersey] null pointer exception on resource class access HttpServletRequest?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 21 Apr 2010 21:08:25 +0200

On Apr 21, 2010, at 9:05 PM, James Russo wrote:

> Paul,
>
> I've logged 514.

Thanks.


> Not sure of fix though, perhaps if null the request should stop
> right there with a WebApplicationException 500?
>
> https://jersey.dev.java.net/issues/show_bug.cgi?id=514
>

Yes, i think a 500 exception should result. With the stack trace in
the server log.

Paul.

> Thanks!
>
> -jr
>
> On Apr 21, 2010, at 2:57 PM, Paul Sandoz wrote:
>
>>
>> On Apr 21, 2010, at 8:22 PM, James Russo wrote:
>>
>>>
>>> On Apr 21, 2010, at 10:46 AM, Paul Sandoz wrote:
>>>
>>>> Hi James,
>>>>
>>>> First time i have seen that type of error. Not sure why it
>>>> occurs. It is rather fundamental and implies that Jersey's
>>>> context is set up with a null request and I do not see how that
>>>> can happen (see the code at the end of the email).
>>>
>>> My fault. I figured it out. I was inadvertently returning null
>>> from a resourceFilter. Perhaps having some assertion or a log
>>> message if that happens?
>>>
>>
>> Ah yes, my fault too! Can you log an issue and i will fix it?
>>
>> Paul.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>>
>