Agreed. Hopefully really soon we'll be moving to using the saxpath project (http://sourceforge.net/projects/saxpath) which will avoid the use of Antlr as the parser of XPath expressions and we'll have a smaller and faster code base and better exceptions if bad XPath expressions are used.
 
The detail of this problem is that right now Antlr has a fiddley way of seperating runtime from build time classes. It looks like the Antlr build process missed one out. I'll have a look at fixing this real soon now.
 
James
----- Original Message -----
Sent: Wednesday, June 20, 2001 9:38 AM
Subject: [dom4j-dev] missing class in distribution : org.antlr.DefaultFileLineFormatter

When a bad XPath expression is used then the error cannot be reported.

(does nobody ense ever mistype an XPath ? L )

 

Mike

 

 

import org.dom4j.xpath.DefaultXPath;

public class Bug {

 

    public static void main (String args[]) {

        new DefaultXPath("bad expression");

    }

 

}

 

 

java.lang.NoClassDefFoundError: org/antlr/DefaultFileLineFormatter

        at org.antlr.NoViableAltException.toString(NoViableAltException.java:58)

        at java.lang.String.valueOf(String.java:1925)

        at java.io.PrintStream.print(PrintStream.java:426)

        at java.io.PrintStream.println(PrintStream.java:563)

        at org.antlr.Parser.reportError(Parser.java:239)

        at org.dom4j.xpath.parser.XPathRecognizer.step(XPathRecognizer.java:558)

        at org.dom4j.xpath.parser.XPathRecognizer.i_relative_location_path(XPathRecognizer.java:317)

        at org.dom4j.xpath.parser.XPathRecognizer.relative_location_path(XPathRecognizer.java:287)

        at org.dom4j.xpath.parser.XPathRecognizer.location_path(XPathRecognizer.java:162)

        at org.dom4j.xpath.parser.XPathRecognizer.path_expr(XPathRecognizer.java:1323)

        at org.dom4j.xpath.parser.XPathRecognizer.union_expr(XPathRecognizer.java:109)

        at org.dom4j.xpath.parser.XPathRecognizer.xpath(XPathRecognizer.java:85)

        at org.dom4j.xpath.DefaultXPath.parse(DefaultXPath.java:341)

        at org.dom4j.xpath.DefaultXPath.<init>(DefaultXPath.java:81)

        at Bug.main(Bug.java:5)

 

 

Reply via email to