Monday, April 29, 2013

org.apache.ws.security.components.crypto.Merlin cannot create instance

If you are using Apache Axis2 with Rampart module on Weblogic application server and you get the following exception:

java.lang.RuntimeException: org.apache.ws.security.components.crypto.Merlin cannot create instance that occurs because  Rampart is looking at the wrong cacerts file (e.g. java.io.FileNotFoundException: C:\JDK17~1.0_1\jre\lib\security\cacerts), add the following property to your policy file:

<ramp:property name="org.apache.ws.security.crypto.merlin.load.cacerts">false</ramp:property>

I had this issue while running Apache Axis2 client on Weblogic 12c with service running on Tomcat Apache. If you have your service running on Weblogic 12c, you might need to change it there as well.

I had no problems when I ran the same client on Oracle 10g (OC4J). For more information on WSS4J configuration, see http://ws.apache.org/wss4j/config.html