IDCS - Java.net.UnknownHostException When Calling IDCS From Java Code

(Doc ID 2379273.1)

Last updated on MAY 23, 2018

Applies to:

Identity Cloud Service (IDCS) - Version N/A and later
Information in this document applies to any platform.

Symptoms

Getting below error when calling public facing url of IDCS from a java code in an on-premise application:

ServerErrorException: java.lang.RuntimeException: java.net.UnknownHostException: idcs-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.identity.oraclecloud.com

1) IDCS login URL works fine from browser
2) Postman App can make REST API calls fine
3) But when making calls from java code to IDCS URL it thros "UnknownHostException"

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms