ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Jack" <aj...@TrySybase.com>
Subject JXPathPropertyHelper -- error messages/bug?
Date Tue, 27 May 2003 18:05:10 GMT
I am working with centipede which is a heavy user of this property helper.
It has entries like this:

  <property name="project.src.dir"

value="${jxpath:/references/module.xml/root/module/project[@name=$project.na
me]/code[@type='java/plain']/@dir}"/>

If no <code element exists I get an unhelpful exception (below) -- without
any context whatsoever. Is this a bug (i.e. the code ought check
iter.hasNext before calling iter.next) -- and/or could the code at least
annotate the exception with (1) property name (2) property 'expression'.

Thanks in advance.

regards

Adam

------------------------------------------------------------


   java.util.NoSuchElementException
        at
org.apache.commons.jxpath.ri.EvalContext.next(EvalContext.java:177)
        at
org.apache.commons.jxpath.ri.compiler.Expression$ValueIterator.next(Expressi
on.java:175)
        at
org.apache.tools.ant.taskdefs.optional.JXPath$JXPathPropertyHelper.getProper
tyHook(JXPath
.java:136)
        at
org.apache.tools.ant.PropertyHelper.getPropertyHook(PropertyHelper.java:197)
        at
org.apache.tools.ant.PropertyHelper.getProperty(PropertyHelper.java:443)
        at
org.apache.tools.ant.PropertyHelper.replaceProperties(PropertyHelper.java:28
9)
        at org.apache.tools.ant.Project.replaceProperties(Project.java:486)
        at
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.
java:310)
        at
org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.
java:266)
        at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:143)
        at org.apache.tools.ant.Task.perform(Task.java:347)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:122)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:120)
        at org.apache.tools.ant.Main.runBuild(Main.java:597)
        at org.apache.tools.ant.Main.start(Main.java:197)
        at org.apache.tools.ant.Main.main(Main.java:235)
F:\data\CommonsVersion\smoke-test>

--
<http://www.try.sybase.com>
Experience Sybase Technology ...


Mime
View raw message