title: javax.net.ssl.SSLException: Not trusted server certificate
body: <p>I m trying read XML data using XML parser from Url("<a href="https://....etc" rel="nofollow">https://....etc</a>").
  But I'm facing below error.
  This is my log.</p>
  
  <blockquote>
    <p>04-08 16:34:23.017:
    WARN/System.err(8052):
    javax.net.ssl.SSLException: Not
    trusted server certificate </p>
    
    <p>04-08
    16:34:23.098: WARN/System.err(8052):
    at
    org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:371)</p>
    
    <p>04-08 16:34:23.107:
    WARN/System.err(8052): at
    org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:92)</p>
    
    <p>04-08 16:34:23.107:
    WARN/System.err(8052): at
    org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)</p>
    
    <p>04-08 16:34:23.107:
    WARN/System.err(8052): at
    org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:164)</p>
    
    <p>04-08 16:34:23.116:
    WARN/System.err(8052): at
    org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)</p>
    
    <p>04-08 16:34:23.116:
    WARN/System.err(8052): at
    org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)</p>
    
    <p>04-08 16:34:23.116:
    WARN/System.err(8052): at
    org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)</p>
    
    <p>04-08 16:34:23.116:
    WARN/System.err(8052): at
    org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)</p>
    
    <p>04-08 16:34:23.127:
    WARN/System.err(8052): at
    org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)</p>
    
    <p>04-08 16:34:23.127:
    WARN/System.err(8052): at
    org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)</p>
    
    <p>04-08 16:34:23.127:
    WARN/System.err(8052): at
    androidexperts.apps.prontonnetworks.xmlparser.(xmlparser.java:108)</p>
    
    <p>04-08 16:34:23.196:
    WARN/System.err(8052): at
    androidexperts.apps.prontonnetworks.prontonnetworks$HandlerServer.doInBackground(prontonnetworks.java:486)</p>
    
    <p>04-08 16:34:23.232:
    WARN/System.err(8052): at
    androidexperts.apps.prontonnetworks.prontonnetworks$HandlerServer.doInBackground(prontonnetworks.java:1)</p>
    
    <p>04-08 16:34:23.257:
    WARN/System.err(8052): at
    android.os.AsyncTask$2.call(AsyncTask.java:185)</p>
    
    <p>04-08 16:34:23.287:
    WARN/System.err(8052): at
    java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)</p>
    
    <p>04-08 16:34:23.307:
    WARN/System.err(8052): at
    java.util.concurrent.FutureTask.run(FutureTask.java:137)</p>
    
    <p>04-08 16:34:23.317:
    WARN/System.err(8052): at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)</p>
    
    <p>04-08 16:34:23.317:
    WARN/System.err(8052): at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)</p>
    
    <p>04-08 16:34:23.317:
    WARN/System.err(8052): at
    java.lang.Thread.run(Thread.java:1096)</p>
    
    <p>04-08 16:34:23.317:
    WARN/System.err(8052): Caused by:
    java.security.cert.CertificateException:
    java.security.cert.CertPathValidatorException:
    TrustAnchor for CertPath not found.
    04-08 16:34:23.327:
    WARN/System.err(8052): at
    org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:168)</p>
    
    <p>04-08 16:34:23.327:
    WARN/System.err(8052): at
    org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:366)</p>
    
    <p>04-08 16:34:23.337:
    WARN/System.err(8052): ... 18 more</p>
    
    <p>04-08 16:34:23.337:
    WARN/System.err(8052): Caused by:
    java.security.cert.CertPathValidatorException:
    TrustAnchor for CertPath not found.</p>
    
    <p>04-08 16:34:23.377:
    WARN/System.err(8052): at
    org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate(PKIXCertPathValidatorSpi.java:149)</p>
    
    <p>04-08 16:34:23.377:
    WARN/System.err(8052): at
    java.security.cert.CertPathValidator.validate(CertPathValidator.java:202)</p>
    
    <p>04-08 16:34:23.377:
    WARN/System.err(8052): at
    org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:164)</p>
  </blockquote>
  
  <p>any one know about it?</p>