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!

Class cast exception in HTTPS in Sun One 6.1

843811Aug 10 2009 — edited Aug 11 2009
Hi everyone, I have devoloped an application connecting to an HTTPS URL and getting output. In my local computer it works well, however, when it is deployed to webroot of Sun One 6.1 and started with server start, it throws class cast exception:
[10/Aug/2009:16:13:11] warning (20524): 	CORE3283: stderr: Exception in thread "Thread-8" java.lang.ClassCastException: com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl cannot be cast to javax.net.ssl.HttpsURLConnection
stderr: at servers.AzercellChargeServer$MoneyDrawTask.run(AzercellChargeServer.java:218)
	at java.lang.Thread.run(Thread.java:619)
[10/Aug/2009:16:13:11] warning (20524): 	CORE3283: stderr: at servers.AzercellChargeServer$MoneyDrawTask.run(AzercellChargeServer.java:225) 
The code snippet causing this exception is;
java.net.URL diamondResponseURL = new URL(url);
HttpsURLConnection dionondResponseConnection = (HttpsURLConnection) diamondResponseURL.openConnection();
As far as I understand, URL's openConnection function returns "com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl" working on application server.

Is there any method to overcome with that problem? (Any JVM settings or Sun One Configuration) Thanks in advance...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 8 2009
Added on Aug 10 2009
2 comments
616 views