UnsupportedOperationException: trusted certificate entries are not password protected

Created the keystore from cert and gives UnsupportedOperationException: trusted certificate entries are not password protected.

keytool -importcert -file xyz.cer -keystore test.jks -alias aliastest

 *    KeyStore.ProtectionParameter protParam =
 *        new KeyStore.PasswordProtection(password);
 *
 *    // get my private key
 *    KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry)
 *        ks.getEntry("privateKeyAlias", protParam);
 *    PrivateKey myPrivateKey = pkEntry.getPrivateKey();