Ask a Question

Advanced Search

Solution ID : SO7222

Last Modified : 05/02/2018

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

Error Message

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


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.


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.