You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Luke Deller <ld...@xplantechnology.com> on 2002/02/26 09:21:51 UTC
xerces2-j in applet
Hi,
I am trying to use xerces2-j in an applet, but I have two problems:
(1) The xercesImpl.jar file is too large for use over the internet. If I
just want to use basic DOM stuff then what can I strip out of the jar file?
(2) org.apache.xerces.util.ObjectFactory doesn't work in an applet because
it tries to use "Thread.getContextClassLoader" without gracefully
degrading to use the default classloader if a security exception is
thrown. I get an "InvocationTargetException" being thrown from
ObjectFactory.java:278 (in function "findClassLoader"). Fixing
"findClassLoader" to return "null" in this case fixes the problem for me.
Is it really necessary for me to modify this code, or am I doing
something wrong?
I am using xerces-j 2.0.0 with the Java plugin from Sun's JRE 1.3.1
Thanks
Luke.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: xerces2-j in applet
Posted by Edwin Goei <ed...@sun.com>.
Andy Clark wrote:
>
> Edwin,
>
> Luke Deller wrote:
> > (2) org.apache.xerces.util.ObjectFactory doesn't work in an applet because
> > it tries to use "Thread.getContextClassLoader" without gracefully
> > degrading to use the default classloader if a security exception is
> > thrown. I get an "InvocationTargetException" being thrown from
> > ObjectFactory.java:278 (in function "findClassLoader"). Fixing
> > "findClassLoader" to return "null" in this case fixes the problem for me.
>
> The ObjectFactory code is almost taken directly from the JAXP
> implementation. Do you think that this code should be changed
> to avoid this security exception problem? How do you think of
> Luke's proposed fix -- do you see any problems with it?
I'll take a look as soon as I have a free moment. Let me know if this
isn't good enough.
-Edwin
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: xerces2-j in applet
Posted by Andy Clark <an...@apache.org>.
Edwin,
Luke Deller wrote:
> (2) org.apache.xerces.util.ObjectFactory doesn't work in an applet because
> it tries to use "Thread.getContextClassLoader" without gracefully
> degrading to use the default classloader if a security exception is
> thrown. I get an "InvocationTargetException" being thrown from
> ObjectFactory.java:278 (in function "findClassLoader"). Fixing
> "findClassLoader" to return "null" in this case fixes the problem for me.
The ObjectFactory code is almost taken directly from the JAXP
implementation. Do you think that this code should be changed
to avoid this security exception problem? How do you think of
Luke's proposed fix -- do you see any problems with it?
--
Andy Clark * andyc@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org