Introduction
After countless hours, you finally finished a secure java server ready for deployment.
If you installed clean copy of Ubuntu 12.04 server or updated it, you may face following error during run time.
javax.net.ssl.SSLException: java.security.ProviderException:
sun.security.pkcs11.wrapper.PKCS11Exception: CKR_DOMAIN_PARAMS_INVALID
Problem
This is known bug with OpenJDK that has not been resolved yet.
Solution
This can be fixed by editing following file:
/etc/java-6-openjdk/security/java.security
Find following line:
security.provider.9=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg
And change to following lines:
security.provider.9=sun.security.ec.SunEC
security.provider.10=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg
Now your server will not crash!! or you have another fun problem with deal with!