You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by "Franco Catrin L." <fc...@tuxpan.com> on 2008/11/17 20:46:30 UTC

Problem and possible solution when running in a Java Applet

Hi!

First of all, thank you for your great work in xml-security

I wrote a simple Java Applet to sign XML documents in the client
machine.  It run flawlessly as a standalone Java Application, but in a
restricted Java Applet container (browser) I got a
ClassNotFoundException for
org.apache.xml.security.transforms.implementations.TransformBase64Decode
when calling the Init.init() method.   For some reason that I don't
understand, the classLoader returned in Transform.register(..) can't see
that class, even considering that it is in the same .jar file of the
caller (Transform).

After trying to understand the issue without no sucess, I finally gave
up and added a fallback code to handle this case when the classloader
can't see the Transform implementation.  

Patch attached.

-- 
Franco Catrin L.  TUXPAN Software S.A.
http://www.tuxpan.com/fcatrin

Re: Problem and possible solution when running in a Java Applet

Posted by Sean Mullan <Se...@Sun.COM>.
Classloading issues can be tricky to debug and fix so I'm a bit hesitant to 
apply your patch without a test case. It would be great if you could send us a 
small test case that reproduces the problem.

Thanks,
Sean

Franco Catrin L. wrote:
> Hi!
> 
> First of all, thank you for your great work in xml-security
> 
> I wrote a simple Java Applet to sign XML documents in the client
> machine.  It run flawlessly as a standalone Java Application, but in a
> restricted Java Applet container (browser) I got a
> ClassNotFoundException for
> org.apache.xml.security.transforms.implementations.TransformBase64Decode
> when calling the Init.init() method.   For some reason that I don't
> understand, the classLoader returned in Transform.register(..) can't see
> that class, even considering that it is in the same .jar file of the
> caller (Transform).
> 
> After trying to understand the issue without no sucess, I finally gave
> up and added a fallback code to handle this case when the classloader
> can't see the Transform implementation.  
> 
> Patch attached.
> 
>