sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Google Groups | Joshua García Palacios | 10 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd and rafael . Or join the community to write better ones.
  1. 0

    Implement feature PortScan and Forced Browse to JUnit test with zap api client

    Google Groups | 10 months ago | Joshua García Palacios
    sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  2. 0
    samebug tip
    Set the 'mail.smtp.ssl.trust' system property to an smtp host, like 'smtp.gmail.com'.
  3. 0
    samebug tip
    If you're using wiremock, configure your code to accept wiremock self-signed certificate or create a keystore and certificate that are trusted by your HTTP client and configure wiremock to use that
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    The SSL certificate is expired. You can workaround by instantiating a custom SSLContext.
  6. 0

    Download images from a HTTPS URL in Java

    Stack Overflow | 2 years ago | user2076284
    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
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. sun.security.provider.certpath.SunCertPathBuilderException

    unable to find valid certification path to requested target

    at sun.security.provider.certpath.SunCertPathBuilder.build()
  2. Java RT
    Validator.validate
    1. sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
    2. sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
    3. java.security.cert.CertPathBuilder.build(Unknown Source)
    4. sun.security.validator.PKIXValidator.doBuild(Unknown Source)
    5. sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
    6. sun.security.validator.Validator.validate(Unknown Source)
    6 frames
  3. Java JSSE
    AppOutputStream.write
    1. sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
    2. sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
    3. sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
    4. sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
    5. sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
    6. sun.security.ssl.Handshaker.processLoop(Unknown Source)
    7. sun.security.ssl.Handshaker.process_record(Unknown Source)
    8. sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    9. sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    10. sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
    11. sun.security.ssl.AppOutputStream.write(Unknown Source)
    11 frames
  4. Java RT
    BufferedOutputStream.flush
    1. java.io.BufferedOutputStream.flushBuffer(Unknown Source)
    2. java.io.BufferedOutputStream.flush(Unknown Source)
    2 frames
  5. HttpClient
    HttpClient.executeMethod
    1. org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)
    2. org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.flushRequestOutputStream(MultiThreadedHttpConnectionManager.java:1565)
    3. org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116)
    4. org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
    5. org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
    6. org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    7. org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    8. org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    8 frames
  6. com.sittinglittleduck.DirBuster
    WorkerGenerator.run
    1. com.sittinglittleduck.DirBuster.GenBaseCase.genBaseCase(GenBaseCase.java:145)
    2. com.sittinglittleduck.DirBuster.workGenerators.WorkerGenerator.run(WorkerGenerator.java:230)
    2 frames
  7. Java RT
    Thread.run
    1. java.lang.Thread.run(Unknown Source)
    1 frame