Sunday, August 25, 2013

keytool error :java.io.IoException:Incorrect AVA format

I run this command:

keytool -genkeypair -alias alias -keyalg RSA -keysize 1024 -dname dn -keystore keystore


and this fails with "keytool error :java.io.IoException:Incorrect AVA format"

Just remove -dname:
keytool -genkeypair -alias alias -keyalg RSA -keysize 1024 -keystore keystore


and answer all questions directly, and you will be fine. Otherwise, provide a proper dname, like "CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino, S=California, C=US". For details, see the EXCELLENT http://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html (when everything else fails, read the manual). Especially, avoid funny characters in the dname, including . or $ or #



No comments: