i have the following problem.
I want to set up a new HttpsURLConnection and I do this with:
...
URL url = new URL("...");
...
HttpsURLConnection uc = (HttpsURLConnection) url.openConnection();
Unfortunately the latter instruction yields a CCE, because it returns a com.sun...HttpsUrlConnectionOldImpl.
Note that I only import javax.net.sss.*, never com.sun...
Also, this code works when I run it from the console (java , but not when I launch it from jboss.
Can anybody explain this?
I ran into the same problem. I discovered I was setting the java.protocol.handler.pkgs to com.sun.net.ssl.internal.www.protocol elsewhere in my code. Once I modified that call to use javax.net.ssl, everything worked fine.