users@jersey.java.net

Re: [Jersey] Problems debugging UriBuilder

From: Gili <cowwoc_at_bbs.darktech.org>
Date: Mon, 1 Dec 2008 10:03:05 -0800 (PST)

You should be using Netbeans 6.5 where execution stops on a breakpoint (not
you pressing "pause"). This will cause only one thread to suspend while
others continue executing. I then added this to the watch Window:
"UriBuilder.fromUri(baseUri).path(SomeResource.class)" and the NPE was
thrown by that expression.

Gili


Paul Sandoz wrote:
>
>
> On Nov 29, 2008, at 3:02 AM, Gili wrote:
>
>>
>> Hi,
>>
>> When I add a UriBuilder to the Netbeans watch window I get the
>> following
>> exception:
>>
>> java.lang.NullPointerException:
>> at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:
>> 87)
>> at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:69)
>> at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:80)
>> [snip]
>>
>> My guess is that the Netbeans debugger thread is not the same as the
>> webapp
>> thread and this causes the implementation to fail. Couldn't the code
>> be more
>> robust in this case?
>>
>
> I just tried a quick experiment with 1.0.1 adding a UriBuilder
> instance to the watch and it worked fine.
>
> Can you describe a bit more your setup?
>
> Paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
>

-- 
View this message in context: http://n2.nabble.com/Problems-debugging-UriBuilder-tp1591176p1599830.html
Sent from the Jersey mailing list archive at Nabble.com.