Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpsURLConnection gives ClassCastException in Weblogic 8.1

 
Kamalakar Sridhara
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<p>
I am getting an error when i run my application in weblogic 8.1 as
ClassCastException at URLConnection.
I know the reason after creating URLConneciton the object i am getting
is "weblogic.net.http.HttpsURLConnection"
but i run this application outside weblogic environment my application
is running fine & the Object is
sun.net.www.protocol.https.HttpsURLConnectionImpl
how do i make the URLConnection Object as
sun.net.www.protocol.https.HttpsURLConnectionImpl even in weblogic 8.1 environment when i run.
</p><br><br>
this is the code i am using
<font size=2><pre>
String strUrl = "https:URL";
URL u1 = new URL(strUrl);
HttpsURLConnection huc = (HttpsURLConnection)u1.openConnection();
huc.setDoInput (true);
huc.setDoOutput (true);
</pre></font>
Thanks
Srihari
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's been a while since I coded my https connection stuff, but from what I remember, some properties must be configured properly staticly (from the config files), or dynamically from the code like this:



I also recall that the code to get the connections should actually be


This still creates Https connection. Unfortunately, I don't recall all the details and the explanations for this. There is a large amount of info online regarding this issue.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic