Deploy AppEngine Project (Eclipse): javax.net.ssl.SSLHandshakeException

If you are getting the below exception during Deploy AppEngine Project 
step (in Eclipse), that means you need to import SSL certificate of 
google.com into your cacerts file under JRE\LIB\SECURITY folder. 

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 com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown 
Source) 
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source) 
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) 
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source) 
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate 
(.......... 

Steps to import Google' SSL certifcate 
============================= 

(1) Visit https://appengine.google.com/ using your browser (I tried 
this using IE6 but I am sure other browsers will have a similar 
functionality). 

(2) Click the "Lock" icon at the status bar. You will see Certificate 
dialog. Click "Details" tab. 

(3) Click "Copy to" button and follow the wizard. Select "DER 
encoded.." on the Export File Format page. Click "Next" 

(4) Browse to some folder, give it a name and click "Save". Example: d:\keystore\google.cer 

(5) Run the below command from your JRE/BIN folder. Make sure you 
adjust the locations of -keystore and -file in the below command. 

keytool -import -keystore keytool -import -keystore D:\gbtn\jdk1.6.0_10\jre\lib\security\cacerts -file d:\keystore\google.cer  

(7) Try Deploy again. If your Deploy tool is using the same JRE where 
you imported the google SSL certificate in above steps, you should be 
fine now. 

你可能感兴趣的:(java,GAE)