Error: "java.lang.Exception: Input not an X.509 certificate" due to not using the original alias during install

Solution ID:    SO7222    Updated:    08/23/2016

Error Message

Error: "java.lang.Exception: Input not an X.509 certificate"

Cause

This error occurs when one of the following conditions are true:
 
The incorrect alias was specified during the import command.
The incorrect keystore file was totaling during the import command.
No alias was specified while trying to import the certificate.

Solution

 
The alias must be the same alias as was used when generating the private key.  To resolve this issue, make sure that you are using the correct keystore and certificate, then run the following keytool command below: 
 
keytool -import -trustcacerts -alias (alias name) -file (name of certificate file) -keypass (key password) -keystore (keystore name) -storepass (keystore password) 
 
If you have forgotten the alias, refer to this solution.
 

Legacy ID

vs6684

Disclaimer:

Terms of use for this information are found in Legal Notices

Contact Support

Find Answers

Languages

This article is available in the following languages: