> 'keytool -import -trustcacerts -alias "ldap.xxxxxxx.de" -file > path/to/cert.pem -keystore $JAVA_HOME/lib/security/cacerts' IMHO you should google the sun.security.pkcs11.wrapper.PKCS11Exception CKR_DOMAIN_PARAMS_INVALID Kind regards.