This is because java is not recognizing root certificate authority (CA) SSL certificate of https://aws.amazon.com.
Solution is to add that certificate to java cacerts file so that it got permanently accepted.
Step 1 : Get root certificate of https://aws.amazon.com
CHROME BROWSER
- Open https://aws.amazon.com
- Select Inspect from context menu(right clicking on page) and navigate to security tab
- Click on view certificates
- Click on top most certificate on hierarchy and confirm it is tailed with Root CA phrase.
- drag and drop that image which you saw written certificate on desktop.
FIREFOX BROWSER
- Open https://aws.amazon.com
- click on the green lock button "show certificate"
- tab "details", "export"
Thats it! you got your root certificate!
Step 2 : Get that certificate added to java cacerts file.
- use keytool.exe inside your jre bin folder.
- fire following command to place your certificate inside cacerts file
keytool –import –noprompt –trustcacerts –alias ALIASNAME -file
/PATH/TO/YOUR/DESKTOP/CertificateName.cer -keystore
/PATH/TO/YOUR/JDK/jre/lib/security/cacerts -storepass changeit
That is it! you got your problem resolved.
PLEASE NOTE
- Do confirm that the jre which is giving you this PKIX error(JRE used by eclipse or your app after deployment) that is where you are performing STEP 2. If you would try with another jre problem would be as it is.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…