简体   繁体   中英

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

Trying to install Eclipse DTP (Data Tools Platform) from Eclipse marketPlace.I am using Eclipse Java Neon . I am getting following exception/error.

Unable to read repository at 
http://download.eclipse.org/datatools/updates/content.jar.
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target

Any help is appreciated.

When downloading the content.jar file you're redirected to another mirror site.

In my case i was redirected to " https://mirrors.shu.edu.cn/eclipse/datatools/updates/content.jar "

This website expose an ssl certificate to you but you don't have any certificate authority able to validate this certificate.

What can you do?

  1. download keystore explorer
  2. In Internet explorer open the developper tools and start network recording in the network view
  3. In the address bar copy/paste " http://download.eclipse.org/datatools/updates/content.jar "
  4. Get the https redirected url from the network view
  5. Launch Keystore explorer and open your cacerts file (JRE_OR_JDK_HOME/jre/lib/security/cacerts). The access password is "changeit"
  6. I don't know the exact translation but in keystore explorer menu bar you will find a menu item something along the line "get certificate from TLS/SSL", click on it and provide the secured domain name (for me : mirrors.shu.edu.cn)
  7. Import the certificate in cacerts and save cacerts
  8. restart eclipse and test again

Some important points:

. cacerts is the default repository for certificate authorities used by java

. it is better to import the certificate chain (all the certificates shown by keystore explorer except the website's one)

. Take a good look to the certificates you're importing in cacerts because java will trust them

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM