You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2003/02/28 08:28:37 UTC

DO NOT REPLY [Bug 17519] New: - Passing .// as the XPath to selectNodeIterator method throws a nullpointer exception.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17519>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17519

Passing .// as the XPath to selectNodeIterator method throws a nullpointer exception.

           Summary: Passing .// as the XPath to selectNodeIterator method
                    throws a nullpointer exception.
           Product: XalanJ2
           Version: 2.4Dx
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: org.apache.xpath
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: sureshar@yahoo.com
                CC: sureshar@yahoo.com


This is while using the ApplyXPath.java sample program. Just pass .// without 
any para name and the following NullPointerException will be thrown. Not a big 
deal still handling the Null value will be nice to do.

Exception in thread "main" java.lang.NullPointerException
        at org.apache.xpath.compiler.XPathParser.Step(XPathParser.java:1564)
        at org.apache.xpath.compiler.XPathParser.RelativeLocationPath
(XPathParser.java:1517)
        at org.apache.xpath.compiler.XPathParser.LocationPath
(XPathParser.java:1490)
        at org.apache.xpath.compiler.XPathParser.PrimaryExpr
(XPathParser.java:1350)
        at org.apache.xpath.compiler.XPathParser.FilterExpr
(XPathParser.java:1257)
        at org.apache.xpath.compiler.XPathParser.PathExpr(XPathParser.java:1222)
        at org.apache.xpath.compiler.XPathParser.UnionExpr
(XPathParser.java:1179)
        at org.apache.xpath.compiler.XPathParser.UnaryExpr
(XPathParser.java:1085)
        at org.apache.xpath.compiler.XPathParser.MultiplicativeExpr
(XPathParser.java:1006)
        at org.apache.xpath.compiler.XPathParser.AdditiveExpr
(XPathParser.java:948)
        at org.apache.xpath.compiler.XPathParser.RelationalExpr
(XPathParser.java:873)
        at org.apache.xpath.compiler.XPathParser.EqualityExpr
(XPathParser.java:813)
        at org.apache.xpath.compiler.XPathParser.AndExpr(XPathParser.java:777)
        at org.apache.xpath.compiler.XPathParser.OrExpr(XPathParser.java:750)
        at org.apache.xpath.compiler.XPathParser.Expr(XPathParser.java:733)
        at org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:150)
        at org.apache.xpath.XPath.<init>(XPath.java:198)
        at org.apache.xpath.XPathAPI.eval(XPathAPI.java:265)
        at org.apache.xpath.XPathAPI.selectNodeIterator(XPathAPI.java:159)
        at org.apache.xpath.XPathAPI.selectNodeIterator(XPathAPI.java:139)
        at ApplyXPath.doMain(ApplyXPath.java:128)
        at ApplyXPath.main(ApplyXPath.java:183)