[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [iaik-jce] NoClassDefFoundError is thrown in reading PKCS12 file
> An applet is written to read PKCS12.
> Unfortunately, error occurs:
> java.lang.NoClassDefFoundError: iaik/pkcs/pkcs7/DataStream
> at TestPKCS12.readPKCS12(TestPKCS12.java:82) [...]
It appears that the runtime of the browser isn't finding the IAIK classes. I would examine your
HTML APPLET tag for the reason.
Is your applet in a JAR file? Are you also including an IAIK jar in the ARCHIVE attribute of the
APPLET tag? Or are you including the IAIK classes when you create your own JAR?
Be careful if you are running in the browser's native virtual machine (as opposed to using the Java
Plugin). If you are writing for Internet Explorer and distributing your applet in a CAB file (as
opposed to a JAR, as Netscape and the Java Plugin expect to find), if IE finds a "cabinets" PARAM it
will ignore any ARCHIVE value in the APPLET tag. The best solution I've found is to unZip the IAIK
JAR and repackage it as a CAB, and include my IAIK CAB file in the "cabinets" PARAM. (You may need
to sign the IAIK CAB file for sandbox security reasons.) To create an HTML file that works with
either browser then, I end up with an APPLET tag that has multiple JARs in the ARCHIVE attribute,
and multiple CABs in the "cabinets" PARAM.
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html
To unsubscribe send an email to firstname.lastname@example.org with the folowing content: UNSUBSCRIBE iaik-jce