Keytool unable to import certificate
<p>While trying to import a certificate I get an error that it could not be imported since the alias(tomcat) in this case was already present</p>

<pre><code>$ keytool -import -v -alias tomcat -file tomcat.crt -keystore ../keystore -storepass changeit
keytool error: java.lang.Exception: Certificate not imported, alias &lt;tomcat&gt; already exists
java.lang.Exception: Certificate not imported, alias &lt;tomcat&gt; already exists
        at sun.security.tools.keytool.Main.addTrustedCert(Main.java:2644)
        at sun.security.tools.keytool.Main.doCommands(Main.java:1006)
        at sun.security.tools.keytool.Main.run(Main.java:340)
        at sun.security.tools.keytool.Main.main(Main.java:333)
pvaddepa.wb10d1.koala&gt; (/web/home/wb10d1/companyCA)
</code></pre>

<p>When I try to find the alias I do not find it - </p>

<pre><code>pvaddepa.wb10d1.koala&gt; (/web/home/wb10d1/companyCA)
$ keytool -list -storepass changeit

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

companycaroot, Feb 27, 2016, trustedCertEntry,
Certificate fingerprint (SHA1): 44:6C:91:DF:F9:D6:C4:D2:F6:74:0C:5E:7E:25:2B:61:A8:EF:97:A4
</code></pre>

<p>I have referred to a <a href="https://stackoverflow.com/questions/20572100/newbie-keytool-command-how-to-update-cert-already-added-to-keystore" title="similar question">similar question on SO</a>, but the result does not change even after deleting.</p>