1 Reply Latest reply on Aug 15, 2005 2:44 PM by Todd Bush

    HttpsURLConnection class cast exception

    auryn Newbie

      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?