This has been dicussed here once. If you search the archives you will find 
answers.

Any way here is it;
This is a problem of the IDE enviroment. If you are working
in an IDE enviroment, then try to copy the files in the carcets to
overwrite the one in the IDE env. and it will work.
First back it up.

Bashiro

 --- On Fri 02/17, Raul Rueda < [EMAIL PROTECTED] > wrote:
From: Raul Rueda [mailto: [EMAIL PROTECTED]
To: [email protected]
Date: Fri, 17 Feb 2006 17:23:46 +0100
Subject: Re: Could not find trusted certificate

Thanks Oleg for your answer. Ive read that page before send the mail to this 
discussion list.With this code: HttpClient httpclient = new HttpClient();  
GetMethod httpget = new GetMethod("https://www.verisign.com/";);  try {    
httpclient.executeMethod(httpget);    
System.out.println(httpget.getStatusLine());  }catch(Exception e){      
System.out.println(e);  }finally {    httpget.releaseConnection();  }I get: 
HTTP/1.1 200 OKBut when I change the URL (other https spanish site), I 
get:javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException:No trusted certificate foundIs a 
problem of the site or is  a problem of my code???thanks.Oleg Kalnichevski 
wrote:> raul wrote:>>> Hi all, this is my first message in the list, sorry for 
my english, >> im spanish ;D>>>> My problem is this (when try to access to a 
HTTPS site):>>>>>> Fatal transport error: 
java.security.cert.CertificateException: Could >> not find trusted 
certificate>> javax.net.ssl.SSLHandshakeException: 
>> java.security.cert.CertificateException: Could not find trusted >> 
>> certificate>>   >> Raul,>> You need to configure the SSL context properly. 
>> Please take a look at > the HttpClient SSL guide:>> 
>> http://jakarta.apache.org/commons/httpclient/sslguide.html>> Oleg>>>>>  at 
>> com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)>>  at 
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)>>  at 
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)>>  at 
>> com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)>>  at 
>> com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)>>  at 
>> com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275)>>  at 
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)>>  at 
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)>>  at 
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)>>  at 
>> com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)>>  at >> 
>> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69)>>  at 
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127)>>  at >> 
org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:827)
 >>>>  at >> 
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1975)
 >>>>  at >> 
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993) 
>>>>  at >> 
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
 >>>>  at >> 
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
 >>>>  at >> 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) 
>>>>  at >> 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324) 
>>>>  at servidorrecargas.bot.httpClient(bot.java:86)>>  at 
servidorrecargas.bot.main(bot.java:62)>>>> Caused by: 
java.security.cert.CertificateException: Could not find >> trusted 
certificate>>  at 
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.a(DashoA6275)>>  at >> 
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA6275)
 >>>>  at >> 
com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA6275)
 >>>>  ... 18 more>>>>>> The code I use is this (I have JSSE1.0.3 
installed):>>>> String url = "https://www.my-site.com/directory/";;>>>>>>  // 
Create an instance of HttpClient.>>     HttpClient client = new 
HttpClient();>>>>     // Create a method instance.>>     GetMethod method = new 
GetMethod(url);>>>>     // Provide custom retry handler is necessary>>     
method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,>>               
                      new >> DefaultHttpMethodRetryHandler(3, false));>>>>     
try {>>       // Execute the method.>>       int statusCode = 
client.executeMethod(method);>>>>       if (statusCode != HttpStatus.SC_OK) {>> 
        System.err.println("Method failed: " + method.getStatusLine());>>       
}>>>>       // Read the response body.>>       byte[] responseBody = 
method.getResponseBody();>>>>       // Deal with the response.>>       // Use 
caution: ensure correct character encoding and is not >> binary data>>       
System.out.println(new String(responseBody));>>>>     }>>     catch 
(HttpException e) {>>       System.err.println("Fatal protocol violation: " + 
e.getMessage());>>       e.printStackTrace();>>     }>>     catch (IOException 
e) {>>       System.err.println("Fatal transport error: " + e.getMessage());>>  
     e.printStackTrace();>>     }>>     finally {>>       // Release the 
connection.>>       method.releaseConnection();>>     }>>>>>> where is the 
problem?? when I access to a HTTP site there is no >> problem, only with HTTPS 
sites.>> THANKS IN ADVANCE!>>   >>>> 
---------------------------------------------------------------------> To 
unsubscribe, e-mail: [EMAIL PROTECTED]> For additional commands, e-mail: 
[EMAIL 
PROTECTED]>>>---------------------------------------------------------------------To
 unsubscribe, e-mail: [EMAIL PROTECTED] additional commands, e-mail: [EMAIL 
PROTECTED]

_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way  your home on the Web - http://www.myway.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to