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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via Stack Overflow by carlos

Set the mail.smtp.ssl.trust system property to an smtp host, like smtp.gmail.com.

,
Expert 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

Solutions on the web

via Google Groups by Luke Orland, 10 months ago
unable to find valid certification path to requested target
via Google Groups by Berty, 2 years ago
unable to find valid certification path to requested target
via commandlinefanatic.com by Unknown author, 1 year ago
unable to find valid certification path to requested target -> [Help 1]
via Stack Overflow by Unknown author, 2 years ago
unable to find valid certification path to requested target
via GitHub by klisly
, 2 years ago
unable to find valid certification path to requested target
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:197)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:255)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:319)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:224)
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:147)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:230)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:270)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1144)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:154)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:609)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:545)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:945)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1190)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1217)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:440)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:660)
at org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:685)
at org.apache.tools.ant.taskdefs.Get$GetThread.get(Get.java:579)
at org.apache.tools.ant.taskdefs.Get$GetThread.run(Get.java:569)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
2 times, 3 weeks ago
Once, 1 month ago
63 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.