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...