i'm working with Liferay and i'm using eclipse, and running a client/server model, using an encrypted socket (SSL).
Currently, my application is running the client/server connection ok when I run the application in batch mode but when i try to start the server in Eclipse the application is giving me error
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
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
I already use the InstallCert.java and copy the jssecacerts into
%JAVA_HOME%/jdk_version/jre/lib/security
but is still giving me errors. I've also checked the certificate (keytool -v -list) and installed manually in the root CAs trusted. What can be the problem? Thanks!
Please refer this answer for your reference.
No need of passing any VM arguments after you successfully installed certificate of the site which is giving you PKIX error!
But key is to find JRE which is giving you this error! So make sure about 2 things:
cacerts
file of JRE which Eclipse is using 在eclipse中运行时,尝试在VM参数中传递certifacate路径
-Djavax.net.ssl.trustStore="PATH_TO_jssecacerts"
tried and tested method. if you face this certificate issue with eclipse plugin installation do below steps:
note the url of the plugin site you are facing issue.
hit that url in browser.
go to lock symbol on left side and click to view certificate
go to details and do file export in Base 64.
better to save cert in eclipse directory.
open cmd with administrator
go to jdk directory you are using to run eclipse and find keytool
run below command keytool -keystore ..\lib\security\cacerts -import -alias example2 -file <path_to_expotrted cert in step 4>
use password - changeit
go to eclipse.ini and add below commands -Djavax.net.ssl.trustStore=C:\Program Files\Java\jdk-11\lib\security\cacerts
make sure to restart eclipse after every plugin site certificate added to keystore.
SOLVED: Certificate issue with eclipse plugin installation Follow these steps:
Understand eclipse uses JRE certs to connect. So you need to add your plugin(website) certificates to JRE/lib/security/cacerts
Save it as .cer file
This is all, your certificates are added in JRE and in eclipse you have said to use these certs.
I have solved this issue in my eclipse after struggling for almost a day. Please find solution here https://stackoverflow.com/a/73034945/7611709
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.