users@jersey.java.net

java.lang.NullPointerException on Android

From: ??????? ???????? <pnickv_at_gmail.com>
Date: Wed, 23 Dec 2009 23:42:08 +0300

Hello.

I try to use

com.sun.jersey.api.client.Client;
com.sun.jersey.api.client.WebResource;

on Android and get java.lang.NullPointerException on this simple code:

         Client client = Client.create();
         String url = "http://google.com";
         WebResource webResource = client.resource(url);
         if (webResource == null)
         {
            return;
         }
         String s = webResource.get(String.class);
//java.lang.NullPointerException!
         Log.i("Test", s);
         return;

the same works perfectly from PC.

could you please take a look as you get a minute and help me?

thank you,
Nick