Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.io.IOException: HTTPS hostname wrong

843811Apr 22 2005 — edited Jun 28 2005
Hello

I was trying to open a connection to secure URL and post content to it.

I got the following exception:

java.io.IOException: HTTPS hostname wrong: should be <165.112.121.195>
at sun.net.www.protocol.https.HttpsClient.b(DashoA12275)

Its apparantly because the connection is
com.sun.net.ssl.internal.www.protocol.https.DelegateHttpsURLConnection
not
sun.net.ssl.www.protocol.DelegateHttpsURLConnection

I tried setting the system property
System.setProperty("java.protocol.handler.pkgs","sun.net.www.protocol");
to force JVM to use the newer Delegate.
Its still doent work. I use JDK 1.4.2_05. I deploy my application in OC4J 9.0.4

Interesting thing is, I use this code in two different applications, it works in
one and doen't work in one. Both containers use same JDK. Both are OC4J
containers.

Any thoughts? I would appreciate.

thanks
Raghavan

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 26 2005
Added on Apr 22 2005
4 comments
5,623 views