I am trying to call a api in java using rest template, when I run the code I am able to get response from the api but when I deploy the code on my jboss server I am getting unknown host exception error
I am calling a public api using an api in java
I am trying to call a api in java using rest template, when I run the code I am able to get response from the api but when I deploy the code on my jboss server I am getting unknown host exception error
I am calling a public api using an api in java
as described by you the API is running locally I am assuming.
More details about your error: https://docs.oracle.com/javase/7/docs/api/java/net/UnknownHostException.html
Thrown to indicate that the IP address of a host could not be determined.
Which points to an error with your host (target) configurations. Few points you should look into:
Your app should work fine once these are taken care. Hope this helps. Happy Coding.