简体   繁体   中英

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

I am trying to connect to a mail server and read my inbox. My code works for gmail but does not seem to work with my exchange server because of the error:

 sun.security.validator.ValidatorException: PKIX path building failed: 
 sun.security.provider.certpath.SunCertPathBuilderException: 
 unable to find valid certification path to requested target

I have tried the following as per my research: 1. downloaded the InstallCert.java and ran the folllowing command:

java InstallCert mail.simbatech.biz:993

and imported the one certificate that came in, I afterwards copied the jssecacerts file to jre/lib/security directory of my java Installation but the same error still persists. Is there Any other way to do this?

It sounds like you're doing the right things, but apparently your application is not using the certificate file you created. Where is your application running? If it's running in an application server, the server may be overriding the trust store configuration and may thus be ignoring your jssecacerts file. Try enabling additional debug output as described in the JavaMail FAQ .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

Related Question PKIX building failed:sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target? CXF:PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target unable to find valid certification path to requested target PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException GCP-PUBSUB:-sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target error Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Java: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Error ' sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target' when using xmpp PKIX path building failed sun.security.provider.certpath.SunCertPathBuilderException
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM