Title: R: R: [WSS4J 1.5] CryptoFactory: Cannot load properties: crypto.properties

> p.s. I'd really appreciate if you ask questions in the mailing list
> :-) This way a lot of others will learn from your experience as well

sorry for this when i reply i forgot to add Cc ;(

i do all your splendid info but the result is this:

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:142)
        at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:119)
        at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:101)
        at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:54)
        at Perform.signer.main(signer.java:100)
Caused by: java.lang.NullPointerException: name
        at java.util.zip.ZipFile.getEntry(Unknown Source)
        at java.util.jar.JarFile.getEntry(Unknown Source)
        at java.util.jar.JarFile.getJarEntry(Unknown Source)
        at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source)
        at sun.misc.URLClassPath.getResource(Unknown Source)
        at sun.misc.URLClassPath.getResource(Unknown Source)
        at java.lang.ClassLoader.getBootstrapResource(Unknown Source)
        at java.lang.ClassLoader.getResource(Unknown Source)
        at java.lang.ClassLoader.getResource(Unknown Source)
        at org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java:149)
        at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResources(DiscoverResources.java:153)
        at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResource(DiscoverResources.java:129)
        at org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(DiscoverResources.java:116)
        at org.apache.ws.security.components.crypto.AbstractCrypto.<init>(AbstractCrypto.java:101)
        at org.apache.ws.security.components.crypto.Merlin.<init>(Merlin.java:62)
        ... 9 more
java.lang.InstantiationException: org.apache.ws.security.components.crypto.Merlin
        at java.lang.Class.newInstance0(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:150)
        at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:119)
        at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:101)
        at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:54)
        at Perform.signer.main(signer.java:100)
java.lang.RuntimeException: org.apache.ws.security.components.crypto.Merlin cannot create instance
        at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:155)
        at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:119)
        at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:101)
        at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:54)
        at Perform.signer.main(signer.java:100)
- Unable to instantiate (1): org.apache.ws.security.components.crypto.Merlin
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:142)
        at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:119)
        at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:101)
        at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:54)
        at Perform.signer.main(signer.java:100)
Caused by: java.lang.NullPointerException: name
        at java.util.zip.ZipFile.getEntry(Unknown Source)
        at java.util.jar.JarFile.getEntry(Unknown Source)
        at java.util.jar.JarFile.getJarEntry(Unknown Source)
        at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source)
        at sun.misc.URLClassPath.getResource(Unknown Source)
        at sun.misc.URLClassPath.getResource(Unknown Source)
        at java.lang.ClassLoader.getBootstrapResource(Unknown Source)
        at java.lang.ClassLoader.getResource(Unknown Source)
        at java.lang.ClassLoader.getResource(Unknown Source)
        at org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java:149)
        at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResources(DiscoverResources.java:153)
        at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResource(DiscoverResources.java:129)
        at org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(DiscoverResources.java:116)
        at org.apache.ws.security.components.crypto.AbstractCrypto.<init>(AbstractCrypto.java:101)
        at org.apache.ws.security.components.crypto.Merlin.<init>(Merlin.java:62)
        ... 9 more
- Unable to instantiate (2): org.apache.ws.security.components.crypto.Merlin
java.lang.InstantiationException: org.apache.ws.security.components.crypto.Merlin
        at java.lang.Class.newInstance0(Unknown Source)
        at java.lang.Class.newInstance(Unknown Source)
        at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:150)
        at org.apache.ws.security.components.crypto.CryptoFactory.loadClass(CryptoFactory.java:119)
        at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:101)
        at org.apache.ws.security.components.crypto.CryptoFactory.getInstance(CryptoFactory.java:54)
        at Perform.signer.main(signer.java:100)


How it's possible? Where i mistake

Thanks a lot for your answer




-----Messaggio originale-----
Da: Ruchith Fernando [mailto:[EMAIL PROTECTED]]
Inviato: lun 12/06/2006 18.29
A: [EMAIL PROTECTED]
Oggetto: Re: R: [WSS4J 1.5] CryptoFactory: Cannot load properties: crypto.properties

>   thank you for your help, sorry if i ask you stupid things but it's the
> first time i use this class and for my bad english.

No problem at all :-)

>  Iin effect i hava a pkcs12 keystore and i want to add its certificate to
> soap message and sign it with private key the problem is that for the moment
> i use eclipse and i don't know where set classpath
>  Can you help me to do this??


First you can create a dir (lets call it "temp") and create a dir by
the name "keys" in it and copy the PKCS12 keystore file into the
"keys" dir.

In eclipse you can
 - Right click on the project -> select properties
 - Select "Java Build Path" -> Libraries

This "Libraries" tab is is where you can add directories and jars to
your classpath. Use "Add class folder" button to add the "temp" dir we
created to  the classpath.

Now copy the crypto.properties file into the "src" dir of the eclipse
project. (into any of the dirs listed in Project->Properties->Java
Build Path ->Source)

Thanks,
Ruchith

p.s. I'd really appreciate if you ask questions in the mailing list
:-) This way a lot of others will learn from your experience as well

Reply via email to