## Wednesday, July 14, 2010

### java.io.IOException: Cannot recover key (Errors & Solutions #5)

Error

java.io.IOException: Cannot recover key

Solution

The KeyStore password and The Key password should be the same :)

keytool -storepasswd -new newpassword -keystore KeyStore.jks
keytool -keypasswd -alias MyKeyAlias -new newpassword -keystore KeyStore.jks

Note: supply old password for both keystore and alias when asked for

1. Thanks Karim!

2. Thank you very much! I had loose 2h hours trying to understand this issue.

3. Very helpful, solved my problem very quickly. Thanks!

4. You sir have just made my life SO much easier. Keys in future will be exported using the same password as my keystore. Thank you very much.

5. the first command pass fine, but please how can i know "MyKeyAlias" ?

thank's

6. It saves my lot of time. Thank you very much

7. Thanks man. You saved me. Warm regards from Mexico and Colombia.

8. Thanks Man

Thanks

9. Thanks very much!

10. Thanks! I appreciate your posting this!

11. Great Help !

12. Thanks!!!

13. I'm creating a lab exercise for HP SiteScope to run via TLS/SSL and your article just let me fix a show-stopper. THANK YOU!!!

14. Hello, I seem to have the same problem. All the details are correct but Android studio cannot recover my keystore. Maybe the keystore file was corrupted. But when I open it it commandline I can see everything is okay. I am afraid I wont be able to update my app on google play.

15. Hello, I have created the keystore file .jks format when trying to configure the .jks file format on my tomcat server.xml file i got this error. can please help out me and below i have mention the error details

SEVERE: Failed to load keystore type JKS with path C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\mykeystore.jks due to C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\mykeystore.jks (The system cannot find the file specified)
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\mykeystore.jks (The system cannot find the file specified)

16. Thank you. Much appreciated.

17. Time saver! 10x.

18. Thank you , very very much appeciated, + infinity :)