gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject jaxen-from-packaged-dom4j: where to place <work> in CLASSPATH
Date Tue, 10 Feb 2004 08:32:23 GMT
Hi,

if you are fast, you can see that jaxen-from-packaged-dom4j fails on
"traditional" Gumps at
<http://gump.covalent.net/log/jaxen-from-packaged-dom4j.html>.

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, <work> 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
<work> entry.

So, should <work> 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

Mime
View raw message