java.security.UnrecoverableKeyException: Cannot recover key
<p>I ran following commands to generate a keystore, certificate and a truststore:</p>

<ol>
<li>keytool -genkeypair -keyalg RSA -keysize 2048 -alias clientcertalias -dname "CN=Local,OU=Department,O=Company,L=City,ST=State,C=US" -keystore keystore.jks  -storepass "clientpassword1" -keypass "clientpassword2" </li>
<li>keytool -export -alias clientcertalias -file client.cer -keystore  keystore.jks  -storepass "clientpassword1" </li>
<li>keytool -import -v -trustcacerts -alias clientcertalias -file client.cer -keystore  keystore.jks -storepass "serverpass" -noprompt; </li>
</ol>

<p>When I try to start my tomcat server, it gives above mentioned exception. But when I keep "storepass" and "keypass" of point 1 same, my server starts smoothly. What is significance of the two passwords? Why do we have to keep them same? </p>