[jdom-interest] JDOM with SAXBuider conflict within Tomcat/Cataline

Christoph Reck reck at dfd.dlr.de
Thu Jan 18 01:48:48 PST 2001

I'm using JDOM successfully within Apache's Turbine/Velocity
There is a classloader issue that could be fixed if
jdom.input.SAXBuilder.parse would allow specifying the SAX parser (or
factory) instance instead of the classname. This would be usefull since
the crimson JAXP SAXParserImpl does not provide a public(package?) empty
constructor as the SAXBuilder needs.

The problem arose when Turbine went to Tomcat 4.0 beta (which uses
Catalina es the servlet engine) I got "sealing violation" exceptions of
the classloader (JSP uses a sealed crimson.jar, my application used
JDOM/xerces in another classloader context).

Within the Tomcat User's Archive
(http://jakarta.apache.org/site/mail.html) you find the problem covered:

My current (ugly) workaround is to use the CrimsonDOMAdapter. Do it
reads a DOM and then makes a JDOM out of it (ugh).

A) Any chance that the pattern used in JDOM could be fixed to allow
using the cromson SAX reader? 

B) An ugly aternative would be to duplicate the SAXBuilder as a
propietary CrimsonSAXBuilder. 

C) Another alternative is to put preasure on xml.apache.org (and SUN?)
on updating the pattern used within Crimson to be more (simple) SAX

Which way to go?

:) Christoph

More information about the jdom-interest mailing list