• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HttpsURLConnection problem

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a ssl proxy installed which routes requests to non-ssl
url. At proxy, i installed server certificate and changed SSLClinetAuth
to off so that client need not produce any client authentication.
From my client code, i access proxy using:
URL url = new URL("https://hostname.central.sun.com:443/servlet/TestServlet");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setUseCaches(false);
connection.setRequestMethod("POST");
connection.setDoInput(true);
connection.setDoOutput(true);
connection.connect();

///////////
WHen i execute , i get error as :
Exception in thread "main" java.lang.NoSuchMethodError: sun.net.www.http.KeepAliveCache: method get(Ljava/net/URL;Ljava/lang/Object Ljava/lang/Object; not found
at sun.net.www.protocol.https.HttpsClient.a(DashoA6275)
at sun.net.www.protocol.https.HttpsClient.a(DashoA6275)
at sun.net.www.protocol.https.HttpsClient.a(DashoA6275)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.plainConnect(DashoA6275)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA6275)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(DashoA6275)
at pkg1.SecureSessionCredentialsNew.<init>(SecureSessionCredentialsNew.java:169)
at pkg1.SecureSessionCredentialsNew.main(SecureSessionCredentialsNew.java:522)

What am i missing.Any help is appreciated.
Thanks
 
Ranch Hand
Posts: 427
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you aren't using JDK 1.4.0, please upgrade.
That's the best advice that I can give you.
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have probably mixed up the wrong version of JSSE with the wrong JDK version. As Sean mentioned, the easiest route is to use J2SE 1.4 and get the whole shebang (JCE, JAAS, JSSE) integrated and ready to go.
Also, please review our naming policy and change your display name. Thanks.
- Peter
 
straws are for suckers. tiny ads are for attractive people.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic