2

In my android app I'm trying to make a POST to a particular URL. The app makes several POSTS to other URLS without any issues and works fine in the simulator. This one URL always throws

java.net.UnknownHostException: Unable to resolve host "xxxx-xxxx": No address associated with hostname

If I open a browser both on my mac and on the simulator I CAN navigate to the URL!

Anything I try in java code throws an exception

For example

HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();

throws

java.net.UnknownHostException: Unable to resolve host "xxxx-xxxx": No address associated with hostname

The URL looks something like this...

http://xxxx-xxxx-zzzz:8080/risk-restapi/catest/Advanced/eval

Any ideas why java does not like this URL. The URL works fine in Xcode and an Objective C iOS app!

thanks in advance...!

Jon
  • 1,608
  • 7
  • 25
  • 38
  • I would suggest trying to re-connect WiFi as explained on this http://stackoverflow.com/questions/19951466/java-net-unknownhostexception-unable-to-resolve-host-url-no-address-associ thread then add your result to your posted question. –  Jun 23 '16 at 19:09
  • I tried that. Other URL work fine in the app before and after making this call. Must be something with the URL. Wonder why iOS / Xcode does not have an issue with it. – Jon Jun 24 '16 at 12:14

0 Answers0