tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: Still have XML loading problems
Date Fri, 23 Mar 2001 23:02:40 GMT
Kevin Jones wrote:

> Yep 1.3
>
> > I think the only workaround for this is to ship our own copy of
> > the JAXP JAR
> > files, with the "sealed" attribute removed.  I'm also going to be
> > talking with
> > the JAXP folks about removing that in their next release.
>
> :-(
>
> What would happen if you made a special case of the JSP servlet and loaded
> it early?
> Could you preload jasper somewhere else?
>

It (the JSP servlet) is loaded early already.

It (and its XML parser) are now loaded by another classloader (not sure
that was
true on the 22nd -- if your Tomcat 4.0 has "jasper-compiler.jar" and
"jasper-runtime.jar" separated, then it is for you).

The problem is the following scenario:

* JSP servlet loads early, parses TLDs from the web.xml file (which
  causes some JAXP parser classes to be loaded).

* You do something with Xerces that causes Xerces classes to
  be loaded, from your webapps class loader (parent of the one
  used by the JSP servlet).

* You do something with a JSP page that causes more parser
  classes to be loaded (from the JSP servlet's classloader), including
  a class with the same fully qualified name as one of the Xerces
  classes you just loaded.

* Under 1.2 this worked.  Under 1.3 it gives sealing violation errors

The only other possible workaround I can think if is to exhaustively
load every
single class file out of jaxp.jar and crimson.jar at startup time.  That
seems
horrendously wasteful of memory (especially when you consider that this
has to
be done for each web app).

>
> Kevin Jones
> DevelopMentor
> www.develop.com

Craig

Mime
View raw message