Return-Path: Mailing-List: contact gump-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list gump@jakarta.apache.org Received: (qmail 82006 invoked from network); 10 Feb 2004 08:32:13 -0000 Received: from unknown (HELO bodewig.bost.de) (62.96.16.111) by daedalus.apache.org with SMTP; 10 Feb 2004 08:32:13 -0000 Received: (from bodewig@localhost) by bodewig.bost.de (8.11.6/8.11.6) id i1A8WN406453; Tue, 10 Feb 2004 09:32:23 +0100 X-Authentication-Warning: bodewig.bost.de: bodewig set sender to bodewig@apache.org using -f To: gump@jakarta.apache.org Subject: jaxen-from-packaged-dom4j: where to place in CLASSPATH X-Draft-From: ("nnfolder:mail.gump-dev" "") From: Stefan Bodewig Date: Tue, 10 Feb 2004 09:32:23 +0100 Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Portable Code, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, if you are fast, you can see that jaxen-from-packaged-dom4j fails on "traditional" Gumps at . The reason is this: [javac] Compiling 23 source files to /data/gump/jaxen/target/test-classes [javac] /data/gump/jaxen/src/java/test/org/jaxen/AddNamespaceTest.java:124: unreported exception org.jaxen.JaxenException; must be caught or declared to be thrown [javac] super( expr ); [javac] ^ [javac] /data/gump/jaxen/src/java/test/org/jaxen/JaxenHandlerTest.java:158: setXPathHandler(org.jaxen.saxpath.XPathHandler) in org.jaxen.saxpath.SAXPathEventSource cannot be applied to (org.jaxen.JaxenHandler) [javac] reader.setXPathHandler( handler ); [javac] ^ [javac] /data/gump/jaxen/src/java/test/org/jaxen/JaxenHandlerTest.java:203: setXPathHandler(org.jaxen.saxpath.XPathHandler) in org.jaxen.saxpath.SAXPathEventSource cannot be applied to (org.jaxen.JaxenHandler) [javac] reader.setXPathHandler( handler ); [javac] ^ [javac] 3 errors It doesn't fail on Gumpy and I've been trying to find out why. Taking the very first error, it is the constructor of class MockXPath extends BaseXPath with public MockXPath(String expr) throws SAXPathException and in src/java/main/org/jaxen/BaseXPath.java we find protected BaseXPath(String xpathExpr) throws JaxenException As JaxenException extends SAXPathException this should compile. Digging deeper, there is another BaseXPath class coming in from dom4j-full.jar in the packaged dom4j project, JaxenException is there as well. It seems as if JaxenException didn't extend SAXPathException in that version. In "traditional" Gump, elements get appendend to the CLASSPATH while Gumpy prepends them. So in "traditional" Gump we should pick up the classes from dom4j-full.jar while Gumpy sees the one from the entry. So, should get to the front or the end of the CLASSPATH? Adding it to the front seems right as long as it doesn't get abused to point to jars of released versions inside the CVS tree, but I may be missing a reason why "traditional" Gump works the way it does right now. Stefan