File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Security and the fly likes Unable to use JKS type - Please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Unable to use JKS type - Please help" Watch "Unable to use JKS type - Please help" New topic

Unable to use JKS type - Please help

Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Hi All,

Below are the entries %JAVA_HOME%\jre\lib\security\ file and I am using java
version 1.4.2_04


When I run the commands "keytool -list" or "keytool -list -storetype JKS" on my dos prompt I am getting below error :
keytool error: Invalid keystore format

And when I the command "keytool -list -storetype JCEKS" I am getting below output :
Keystore type: JCEKS
Keystore provider: SunJCE
Your keystore contains 0 entries

There is some java file given by some third party (actually it is dsig.SampleSign2 that comes bundled with IBM XML Security Suite) that uses the below line in its code :
KeyStore keystore = KeyStore.getInstance("JKS");

And so in accordance with the above JKS keystore type used I want to update the default .keystore with my newly generated certificate and so when I apply the command

keytool -genkey -dname "CN=Doug Tidwell, OU=developerWorks, O=IBM, L=Research Triangle Park, S=North Carolina, C=US" -keypass changeit -storepass changeit -alias xss4j1

I am getting below error message :

keytool error: Invalid keystore format

Can anyone please help me. What am I doing wrong here ...

Thanks & Regards,

RR Kumaran
SCJP 1.4
It is sorta covered in the JavaRanch Style Guide.
subject: Unable to use JKS type - Please help
Similar Threads
Connecting to LDAP server using SSL
Keystore and Encryption
Invalid keystore format error
PFX file not getting imported into keystore