Return-Path: Delivered-To: apmail-jakarta-avalon-dev-archive@jakarta.apache.org Received: (qmail 49106 invoked by uid 500); 4 Jun 2001 21:50:03 -0000 Mailing-List: contact avalon-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: "Avalon Development" Delivered-To: mailing list avalon-dev@jakarta.apache.org Received: (qmail 49084 invoked from network); 4 Jun 2001 21:50:01 -0000 Message-ID: <20010604215005.79555.qmail@web13404.mail.yahoo.com> Date: Mon, 4 Jun 2001 22:50:05 +0100 (BST) From: =?iso-8859-1?q?Paul=20Hammant?= Subject: org.xml.sax libraries To: Avalon MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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