Skip to main content

KeyTool -genkeypair gives exception - "Keystore file exists, but is empty"

No replies
ajayjadhav
Offline
Joined: 2007-04-23
Points: 0

I have 1.6 installed and ran this single statement at the command line. I got the following error:

C:\Program Files\Java\jre1.6.0_07\bin>keytool -genkeypair -v -dname "cn=John Doe, ou=Software Development, o=ABC, l=Bellport, st=Yarrow, c=US" -alias mytestkey -keypass Password1 -keystore S:\abc\keystore -storepass Password1 -v validity 365 -keyalg RSA -sigalg MD5withRSA

keytool error: java.lang.Exception: Keystore file exists, but is empty: S:\abc\keystore
java.lang.Exception: Keystore file exists, but is empty: S:\abc\keystore

at sun.security.tools.KeyTool.doCommands(Unknown Source)
at sun.security.tools.KeyTool.run(Unknown Source)
at sun.security.tools.KeyTool.main(Unknown Source)

I confirmed that the keystore path is correct. Any thoughts as to how to trouble shoot?