[Resolved]java-sun.security.validator.ValidatorException: PKIX path building failed

After searching many articles, I finally found a solution! Error report details Solution The first method (applicable to my own solution): httpclient-4.5.jar regularly sends http packets, but suddenly an error is reported one day, which is caused by the change of http certificate. previous code try { CloseableHttpClient httpClient = buildDefaultHttpClient(); String url = domain.getUrl(); […]

SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed

1. Background After a project updated the Nginx SSL certificate in May 2023, it was normal to access the system directly in the browser, but another project of its own and other third-party systems returned an error message when calling through the interface address: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid […]

PKIX path building failed, SunCertPathBuilderException: unable to find valid certification path to re…

Background: There is a project that needs to call the API of gitlab, and the development phase is carried out on Windows. After development is completed and deployed to Linux, the following error is reported when requesting the gitlab interface: 2023.03.22 10:30:39.522 ERROR [http-nio-8089-exec-2] org.apache.juli.logging.DirectJDKLog 181 log – Servlet.service() for servlet [dispatcherServlet] in context with […]

Request https error certificate verification failed (javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX

Project scenario: Request https error certificate verification failed (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) Problem description When requesting a third-party HTTPS URL in the project, an error occurs that the SSL certificate verification failed. 14:33:55.195 [main] ERROR com.bd.common.utils.OKHttpUtil – context javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building […]

Solve sun.security.validator.ValidatorException: PKIX path building failed

1. Error message 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… … 2. Cause of the problem The source application does not trust the target application’s certificate because the certificate or certificate chain was not found in the source application’s JVM truststore. 3. Solution Write a security […]

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to fin

Summary: java access Https interface to get data exception Exception: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Translation: Unable to find a valid authentication path to the requested target Appearance: Some computer environments can run, and some environments cannot Reason: The use environment is JDK instead of OpenJDK, […]

GraalVMgu install xxx I/O error occurred: PKIX path building failed: SunCertPathBuilderException

gu -v –debug install js A certificate exception occurs when installing the GraalVM plugin Downloading: Component catalog from www.graalvm.org Processing Component: Graal.js Downloading: Component js: Graal.js from github.com I/O error occurred: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target D:\Program Files\Tools\fastgithub_win-x64\cacert>gu -v –debug install js Downloading: Component catalog (source: […]

Solve javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path buildin

When the interface accesses the URL of https, the following error is reported: 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 Reason: The certificate library of JAVA already has the startssl ca certificate, but nginx does not have the startssl ca certificate by default, so the HTTPS […]

Exception: javax.net.ssl.SSLHandshakeException: PKIX path building failed: SunCertPathBuilderException

Article directory overview reason Solution Method 1: Java implementation disables SSL verification (use with caution) Method 2: Update the Java security certificate (the certificate is missing or invalid in the Java environment) Method 3: Update the root certificate of the operating system (if the root certificate of the operating system is expired or incomplete) Overview […]

jenkinsjavax.net.ssl.SSLHandshakeException: PKIX path validation failed: java.security.cert.CertPath

When upgrading jenkins from 2.23 to 2.375.2, a plug-in download error occurs. The error content is as follows: java.security.cert.CertificateNotYetValidException: NotBefore: Wed Mar 15 11:36:14 CST 2023 at java.base/sun.security.x509.CertificateValidity.valid(CertificateValidity.java:273) at java.base/sun.security.x509.X509CertImpl.checkValidity(X509CertImpl.java:675) at java.base/sun.security.provider.certpath.BasicChecker.verifyValidity(BasicChecker.java:190) at java.base/sun.security.provider.certpath.BasicChecker.check(BasicChecker.java:144) at java.base/sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:125) Caused: java.security.cert.CertPathValidatorException: validity check failed at java.base/sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(PKIXMasterCertPathValidator.java:135) at java.base/sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:224) at java.base/sun.security.provider.certpath.PKIXCertPathValidator.validate(PKIXCertPathValidator.java:144) at java.base/sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(PKIXCertPathValidator.java:83) at java.base/java.security.cert.CertPathValidator.validate(CertPathValidator.java:309) at java.base/sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:364) Caused: sun.security.validator.ValidatorException: […]