The definition of the WSS4J crypto provider is wrong. This is _not_ the
JCE crypto provider but the WSS4J crypto provider that handles
all keystore and certificate stuff for WSS4J.
You shall use
org.apache.ws.security.components.crypto.Merlin
or
org.apache.ws.security.components.crypto.BouncyCastle
instead of the class you defined in the properties file.
Both classes are implementations of the WSS4J crypto API but
using and supporting different JDK versions.
AFAIK the Merlin provider works for JDK 1.4 and up and
the above named BouncyCastle provider works with JDK 1.3.
However you may try both to see which implementation of the
WSS4J crypto API works best for you.
Also make sure that you have the appropriate BC jar file
in your classpath that contains the full BC JCE implementation
if you use the org.apache.ws.security.components.crypto.BouncyCastle
class.
Regards,
Werner
[EMAIL PROTECTED] wrote:
>
> I am having trouble using WSS4J with my IBM JDK 1.3.1. Is this
> possible? If so, how?
>
> I have tried lots of things, and sent code/errors in email yesterday
> with no response. In other technology forums, where I am much more
> knowledgable, I have helped lots of people. Please someone here take
> the time to help me ;-) Werner??? Dims??? Anybody???
>
> I looked through the src and couldn't find any tests or examples. I
> have searched Google and all I find is a post from Dims that he got it
> working without much detail. I have WSS4j 1.1.0, so do I need newer?
>
> Can somebody please point me to some helpful information regarding how
> to use WSS4J with a 1.3 JDK? I have been trying with
> org.bouncycastle.jce.provider.BouncyCastleProvider specified in my
> crypto.properties. This fails in the CryptoFactory.loadClass()
> cryptogenClass.getConstructor(classes) on line 116.
>
> Basically, when I run Crypto crypto =
> CryptoFactory.getInstance("bc-crypto.properties"); with the properties
> file below (or null) I get errors.
>
> org.apache.ws.security.crypto.provider=org.bouncycastle.jce.provider.BouncyCastleProvider
>
> org.apache.ws.security.crypto.merlin.keystore.type=jks
> org.apache.ws.security.crypto.merlin.keystore.password=xxxxx
> org.apache.ws.security.crypto.merlin.keystore.alias=mcmclient
> org.apache.ws.security.crypto.merlin.alias.password=xxxxx
> org.apache.ws.security.crypto.merlin.file=C:/Program
> Files/Lotus/notes/jvm/lib/security/test.keystore
>
> - Using Crypto Engine [org.bouncycastle.jce.provider.BouncyCastleProvider]
> - Unable to instantiate (1):
> org.bouncycastle.jce.provider.BouncyCastleProvider
> _java.lang.NoSuchMethodException_: <init>
> at java.lang.Class.getConstructor0(_Native Method_)
> at java.lang.Class.getConstructor(_Class.java:967_)
> at
> org.apache.ws.security.components.crypto.CryptoFactory.loadClass(_CryptoFactory.java:118_)
>
> at
> org.apache.ws.security.components.crypto.CryptoFactory.getInstance(_CryptoFactory.java:101_)
>
> at
> ca.on.gov.jus.justiceconnect.CriminalInvestigationsServiceSoapStub.createCall(_CriminalInvestigationsServiceSoapStub.java:131_)
>
> at
> ca.on.gov.jus.justiceconnect.CriminalInvestigationsServiceSoapStub.submitMajorCaseInvestigation(_CriminalInvestigationsServiceSoapStub.java:151_)
>
> at
> ca.on.gov.jus.justiceconnect.CriminalInvestigationsAgentHelper.NotesMainHelper(_CriminalInvestigationsAgentHelper.java:165_)
>
> at
> CriminalInvestigationsAgent.NotesMain(_CriminalInvestigationsAgent.java:74_)
>
> at
> CriminalInvestigationsAgent.main(_CriminalInvestigationsAgent.java:48_)
> - Unable to instantiate (2):
> org.bouncycastle.jce.provider.BouncyCastleProvider
> _java.lang.ClassCastException_:
> org.bouncycastle.jce.provider.BouncyCastleProvider
> at
> org.apache.ws.security.components.crypto.CryptoFactory.loadClass(_CryptoFactory.java:127_)
>
> at
> org.apache.ws.security.components.crypto.CryptoFactory.getInstance(_CryptoFactory.java:101_)
>
> at
> ca.on.gov.jus.justiceconnect.CriminalInvestigationsServiceSoapStub.createCall(_CriminalInvestigationsServiceSoapStub.java:131_)
>
> at
> ca.on.gov.jus.justiceconnect.CriminalInvestigationsServiceSoapStub.submitMajorCaseInvestigation(_CriminalInvestigationsServiceSoapStub.java:151_)
>
> at
> ca.on.gov.jus.justiceconnect.CriminalInvestigationsAgentHelper.NotesMainHelper(_CriminalInvestigationsAgentHelper.java:165_)
>
> at
> CriminalInvestigationsAgent.NotesMain(_CriminalInvestigationsAgent.java:74_)
>
> at
> CriminalInvestigationsAgent.main(_CriminalInvestigationsAgent.java:48_)
> _java.lang.ClassCastException_:
> org.bouncycastle.jce.provider.BouncyCastleProvider
> at
> org.apache.ws.security.components.crypto.CryptoFactory.loadClass(_CryptoFactory.java:127_)
>
> at
> org.apache.ws.security.components.crypto.CryptoFactory.getInstance(_CryptoFactory.java:101_)
>
> at
> ca.on.gov.jus.justiceconnect.CriminalInvestigationsServiceSoapStub.createCall(_CriminalInvestigationsServiceSoapStub.java:131_)
>
> at
> ca.on.gov.jus.justiceconnect.CriminalInvestigationsServiceSoapStub.submitMajorCaseInvestigation(_CriminalInvestigationsServiceSoapStub.java:151_)
>
> at
> ca.on.gov.jus.justiceconnect.CriminalInvestigationsAgentHelper.NotesMainHelper(_CriminalInvestigationsAgentHelper.java:165_)
>
> at
> CriminalInvestigationsAgent.NotesMain(_CriminalInvestigationsAgent.java:74_)
>
> at
> CriminalInvestigationsAgent.main(_CriminalInvestigationsAgent.java:48_)
> - Failure trying to get the Call object; nested exception is:
> _java.lang.RuntimeException_:
> org.bouncycastle.jce.provider.BouncyCastleProvider cannot create instance
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]