avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hammant <paul_hamm...@yahoo.com>
Subject org.xml.sax libraries
Date Mon, 04 Jun 2001 21:50:05 GMT
Background :
============

I'm porting Batik to Jesktop.  It's 99% finshed and quite a whopper of an application.

Problem :
=========

Included in Batik is org.xml.sax classes.  The factory tries to dynamically load a parser.
 Batik
wants crimson (crimson-parser.jar).  Avalon already has org.xml.sax in classpath, so classloader
uses the factory from the one with Avalon, not the classes loaded by a different (leaf)
classloader for Batik in Jesktop in Avalon.  Of course that's right (security), but wrong
becase
the top level, Avalon, classloader knows nothing of the leaf classloader and it's clearly
visible
crimson jar.  

Solution #1
===========

Talk to the poeple at www.xml.org and get them to add a classloader param to the
XMLReaderFactory.createXMLReader() method.  Same trick as used for Repository (talked of recently)

Solution #2
===========

Delete org.xml from my fork of Batik, place crimson-parser in pheonix's libs directory.

Summary
=======

Naturely I opted for solution #2, but it feels hacky.  I'll email David Megginson (Mr SAX).

Incidentally, the classes are marked as...

  // NO WARRANTY!  This class is in the Public Domain.

... which surely means that all GPL cannot import it ;-)

Regards,

-PH


____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Mime
View raw message