commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randy Paries" <rtpar...@gmail.com>
Subject HttpClient getting a ValidatorException
Date Sat, 13 May 2006 06:45:23 GMT
hello,
if i connect to be site via http everything is cool, but if i connect
using https is get the exception (see below)

the code snippet i am using is:

Thanks for any help
=================================================================
        HttpClient client = new HttpClient();
        if ( port == 80){
            client.getHostConfiguration().setHost(NodeName, 80, "http");
        }else{
            client.getHostConfiguration().setHost(NodeName, 443, "https");
        }

        PostMethod authpost = new PostMethod(billMaxURL);
        authpost.setRequestHeader("User-Agent", "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.1; SV1)");

        NameValuePair PFORM  = new NameValuePair("FORM", "updateacct");
        NameValuePair PCIDX     = new NameValuePair("bmui_cidx", "-1");
        authpost.setRequestBody( new NameValuePair[] {PFORM, PCIDX });

       client.executeMethod(authpost);


=================================================================

javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target at
com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1476)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:847)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:619)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message