[Jsdsi-users] Inquiry about sending Serialized Certificates objects
Status: Pre-Alpha
Brought to you by:
sajma
|
From: Somaya A. <som...@ya...> - 2006-01-16 17:41:23
|
Hi Sameer,
I have an inquiry please. After creating and signing the certificate, I wanted to send it to another agent as a serialized object. However, at the relieving agent I do the following to deserailze the certificate object:
ObjectInputStream oin = new ObjectInputStream(new ByteArrayInputStream(data));
// data is a byte array that contain a byte sequence of the received serialized certificate.
java.io.Serializable s = (java.io.Serializable)oin.readObject();
However I got an exception at oin.readObject(); The exception was as follows:
java.lang.NoClassDefFoundError: cryptix/util/mime/Base64InputStream
at jsdsi.sexp.ObjInputStream.<init>(ObjInputStream.java:40)
at jsdsi.sexp.CertificateFactory.readObj(CertificateFactory.java:43)
at jsdsi.sexp.CertificateFactory.readCertificate(CertificateFactory.java:48)
at jsdsi.sexp.CertificateFactory.engineGenerateCertificate(CertificateFactory.java:59)
at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
at java.security.cert.Certificate$CertificateRep.readResolve(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeReadResolve(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
Then I have included the file cryptix32.jar to the classpath, and its now working with no exceptions.
But I dont understand whats happening .. Why I need to include this file to the classpath?? Isnt it included inside JSDSI by default? Is there any other solution for the above exception other than this?
Many Thanks
Somaya
---------------------------------
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever. |