PKIX path building failed: Add SSL certificate to java

REST communication with the SSL server failed and an error message was displayed.

com.sun.jersey.api.client.ClientHandlerException: 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`

If you make an SSL connection with title = java, PKI PATH construction will fail It seems that the other host should be registered in the trusted list. InstallCert.java was broken, so I searched for it on github. InstallCert Add SSL certificate to Java Just use keytool to add the certificate to cacerts. The InstallCert README was the easiest to understand.

Recommended Posts

PKIX path building failed: Add SSL certificate to java
PKIX path building failed: Add SSL certificate to java
Error handling in Graphql-ruby
A story about PKIX path building failed when trying to deploy to tomcat with Jenkins
Add multi-letter watermark to Java Word
Add watermark to Java to PDF document
[Java] Add WordArt to Word document
Add / remove watermark to Java PowerPoint
[Java] How to add data to List (add, addAll)
Add Document to Azure Search Service (Java)
Add footnotes to Word documents in Java
Add SameSite attribute to cookie in Java
Java (add2)
Java (add)
[Java] Add quotes only to specific CSV columns
Add classpath: to the path specified in spring.datasource.schema
[Java] Article to add validation with Spring Boot 2.3.1.
How to create an oleore certificate (SSL certificate, self-signed certificate)