How to Rectify the Security Error that Occurs when WSAS is Started on Sun Solaris?

Archived Content
This article is provided for historical perspective only, and may not reflect current conditions. Please refer to relevant product page for more up-to-date product information and resources.
  • By Afkham Azeez
  • 17 Oct, 2007

Here is a typical stacktrace this exception generates:

Exception in thread "main" java.lang.ExceptionInInitializerError
at javax.crypto.Cipher.getInstance(DashoA12275)
at javax.crypto.Cipher.getInstance(DashoA12275)
at org.wso2.wsas.util.KeyStoreUtil.persistKeyStore(
at org.wso2.wsas.transport.jetty.HttpsTransportListener.start(
at org.apache.axis2.engine.ListenerManager.start(
at org.wso2.wsas.ServerManager.initListenerManager(
at org.wso2.wsas.ServerManager.start(
at org.wso2.wsas.Main.startServer(
at org.wso2.wsas.Main.main(
Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
at javax.crypto.SunJCE_b.(DashoA12275)
... 11 more
Caused by: Public key presented not for certificate
at Method)
... 12 more
Caused by: Public key presented not for certificate signature
at org.bouncycastle.jce.provider.X509CertificateObject.checkSignature(Unknown
at org.bouncycastle.jce.provider.X509CertificateObject.verify(Unknown
at javax.crypto.SunJCE_b.c(DashoA12275)
at javax.crypto.SunJCE_b.b(DashoA12275)
... 13 more

WSAS encrypts all passwords stored in its database. The security provider used by WSAS is BouncyCastleProvider. The JDK has to be configured to be able to pick up this provider.

Follow these steps to rectify this error:

  1. Locate the file $JAVA_HOME/jre/lib/security/, open it in your favorite editor.
  2. Go to the section titled "List of providers and their preference orders"
  3. Add a new provider as follows:

    where n = the location of the provider you just added. e.g.:


Also note that this error may occur on any JDK. If this happens, the fix is the same as mentioned in this document.

Applies To

1. WSO2 WSAS - versions 1.1 and higher

2. Sun Solaris operating system - any version

More Information

WSO2 WSAS How To Series