java.net.HttpURLConnection throws "Received authentication challenge is null"

by Matthias » Mon, 31 Aug 2009 20:57:58 GMT


Sponsored Links
 I am using HttpURLConnection to send a GET request to a server. Upon
reading the response code, the Android implementation of
HttpURLConnection.doRequestInternal() throws an exception:

"java.io.IOException: Received authentication challenge is null"

I don't even get what the error is trying to tell me. I write an OAuth
param string to the Authorization header, but this works fine on other
occasions. There is nothing peculiar about my request apart from that.

Any idea what this means, what is causing this and how to get around
it? This works fine with Sun's Java implementation, so I guess it's a
problem with Apache Harmony?

Thanks!
Matthias
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. init.rc commands not interpreted

Hi
you should add following line in your board config file

CONFIG_CMDLINE="console=tty0, console=ttySC0,115200 root=/dev/nfs
ip=dhcp mem=248M memchunk.vpu=8m memchunk.veu0=4m init=/init rw"

Line may be change asper your target device.

After add this line you should make your kernel and porting in your
device.
Please let me know in case of any query

Thank you
Pankaj Gadhiya




-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website:  http://www.***.com/ 

2. getFromLocationName Service Not Available

Hey hey,

I'm getting problems with getFromLocationName. Every time I run it, it
stalls at the line:

    List<Address> addresses = geocoder.getFromLocationName("Megazone
Leicester, Leicester, LE1 3HS, UK", 1);

with a LogCat Error of:
    java.io.IOException: Service Not Available
        at android.location.Geocoder.getFromLocationName(Geocoder.java.
159).

I've had a look around and it seems to be a bug, but can anyone verify
it, as some people seem to have it working fine.

        Geocoder geocoder = new Geocoder(this);
        List<Address> addresses =
geocoder.getFromLocationName("Megazone Leicester, Leicester, LE1 3HS,
UK", 1);
                Address SiteAddress = addresses.get(0);
        Double geoLat = SiteAddress.getLatitude() * 1E6;
        Double geoLng = SiteAddress.getLongitude() * 1E6;
        GeoPoint point = new GeoPoint(geoLat.intValue(), geoLng.intValue());


Ta muchly :-)

-- 

3. accessing contentprovider

4. Android Bug (needs re-opening)

5. e-pad i-pad, ai-pad...

6. Android port for OMAP-L138 HawkBoard

7. How to create Multiple instances of an Activity From a Service?