You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by Kap Jang <Ka...@cgifederal.com> on 2007/03/27 17:12:15 UTC

CryptoFactory.class.getClassLoader() returns NULL

Hi, I'm using WSS4J 1.5.1 to build client application and I have
following error in the below code

 

crypto = CryptoFactory.getInstance("crypto.properties");

 

 

 

Caused by: java.lang.RuntimeException:
org.apache.ws.security.components.crypto.Merlin  Not Found

      at
org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoF
actory.java:174)

      at
org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoF
actory.java:157)

      at
org.apache.ws.security.components.crypto.CryptoFactory.getInstance(Crypt
oFactory.java:139)

      at
com.kdj.xmlbuilder.control.KdjWSSecurityManager.<init>(KdjWSSecurityMana
ger.java:78)

      at
com.kdj.xmlbuilder.control.KdjWSSecurityManager.<clinit>(KdjWSSecurityMa
nager.java:65)

      ... 29 more

 

The problem is CryptoFactory.class.getClassLoader() returns NULL in
following code in CryptoFactory.java

Is there anything I missed?

 

    private static Crypto loadClass(String cryptoClassName, Properties
properties) {

            return
loadClass(cryptoClassName,properties,CryptoFactory.class.getClassLoader(
));

    }

 

 

 

My crypto.properties files looks as

 

org.apache.ws.security.crypto.provider=org.apache.ws.security.components
.crypto.Merlin 

org.apache.ws.security.crypto.merlin.keystore.type=jks

org.apache.ws.security.crypto.merlin.keystore.password=privkeystorepwd

org.apache.ws.security.crypto.merlin.keystore.alias=privkeystore

org.apache.ws.security.crypto.merlin.alias.password=privkeystorepwd

org.apache.ws.security.crypto.merlin.file=privkeystore

 

 

Thanks for your help.

 

 

Kap Jang