java.io.IOException: HTTPS hostname wrong: should be <XXXX.XXXX.XXX>

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Check if you didn't set RequestProperty Content-Type to the wrong type or if you're trying to send the wrong file to the server.

Solutions on the web

via Stack Overflow by Selva
, 1 year ago
via Google Groups by markuswww, 3 months ago
HTTPS hostname wrong: should be <localhost>
via Oracle Community by 843811, 4 months ago
HTTPS hostname wrong: should be <mail.yahoo.com>
via nakov.com by Unknown author, 1 year ago
HTTPS hostname wrong: should be <www.nakov.com></strong>
via Oracle Community by 843790, 1 year ago
HTTPS hostname wrong: should be <172.25.73.225>
via Oracle Community by User779298-Oracle, 11 months ago
HTTPS hostname wrong: should be <storage.us2.oraclecloud.com>
java.io.IOException: HTTPS hostname wrong: should be <XXXX.XXXX.XXX>
at sun.net.www.protocol.https.HttpsClient.checkURLSpoofing(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at protocol.URL_Certificate.main(URL_Certificate.java:55)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.