Tomcat SSL: Unable to find a valid certification path for the requested target

I am trying to access the url in my application, but I am getting this error.

1771426 [http-bio-8180-exec-15] ERROR gadget.GadgetValidatorServlet  - wsdl.exception.WSInvokerException: wsdl.exception.WSInvokerException: javax.xml.ws.soap.SOAPFaultException: 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
1771426 [http-bio-8180-exec-15] ERROR gadget.GadgetPortalValidatorServlet  - gadget.exception.GadgetValidatorException: wsdl.exception.WSInvokerException: wsdl.exception.WSInvokerException: javax.xml.ws.soap.SOAPFaultException: 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

I tried to apply all these fixes, but without success: http://www.mkyong.com/webservices/jax-ws/suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/

Soon, he needs to launch the InstallCert application (java InstallCert my.domain.com) and generate the jssecacerts file. After that, I copied and pasted this file into / opt / java / jdk 1.7.0_45 / jre / lib / security / jssecacerts

I also import my certificate, the same as in my ssl url (httpd), into my key store used by tomcat.

Even after that, I still get this error.

Any thoughts?

+4
source share
1 answer

I was able to fix this problem in the past by setting a system property javax.net.ssl.trustStoreat runtime to point to a file jssecacerts. Just putting it in the “right” place never worked for me; I needed to set the location explicitly. In any case, it is more portable, so I recommend it at all if your application ever needs to move around.

System.setProperty("javax.net.ssl.trustStore", "/path/to/jssecacerts");
+2
source

Source: https://habr.com/ru/post/1536176/


All Articles