[ http://nagoya.apache.org/jira/browse/XALANJ-1139?page=history ]

Henry Zongaro updated XALANJ-1139:
----------------------------------

    Priority: Major

> XPathAPI throws NPE If Any Extension Function Used
> --------------------------------------------------
>
>          Key: XALANJ-1139
>          URL: http://nagoya.apache.org/jira/browse/XALANJ-1139
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>     Versions: 2.4Dx
>  Environment: Operating System: All
> Platform: All
>     Reporter: Terry Rosenbaum
>     Assignee: Morris Kwan

>
> XPathAPI constructs an XPathContext using the
> default ctor (i.e. not supplying an ExtensionProvider).
> Thus, when any attempt is made to call an
> extension function, a null ExtensionProvider pointer
> is retrieved and dereferenced resulting in NPE at FuncExtFunction.java:196.
> XPathContext is constructed in XPathAPI.java or
> CachedXPathAPI.java (e.g. xpathSupport = new XPathContext();).
> XPath used: /ico/keywords/keyword[regexp:containsMatch('ll*', 'llal')]
> containsMatch is defined in the PatternMatcher class (no package).
> PatternMatcher source and instructions are available at:
> http://www-106.ibm.com/developerworks/library/x-callbk/?open&l=976,t=gr
> Tested using ApplyXPath sample.
> Test Document used was:
> <ico xmlns:regexp="xalan://PatternMatcher">
>       <id>423234</id>
>       <keywords>
>               <keyword>Haus</keyword>
>               <keyword>Baum</keyword>
>               <keyword>Auto</keyword>
>               <keyword>Boot</keyword>
>               <keyword>Sonne</keyword>
>       </keywords>
>       <faws>
>               <faw>Meier</faw>
>               <faw>Muller</faw>
>               <faw>Bremen</faw>
>               <faw>Winter</faw>
>               <faw>Boot</faw>
>               <faw>PC</faw>
>       </faws>
>       <author>Heiner Meier</author>
>       <words>502</words>
>       <date>19082002</date>
> </ico>
> Stack trace wass:
> Exception in thread "main" java.lang.NullPointerException
>         at org.apache.xpath.functions.FuncExtFunction.execute
> (FuncExtFunction.java:196)
>         at org.apache.xpath.axes.PredicatedNodeTest.executePredicates
> (PredicatedNodeTest.java:326)
>         at org.apache.xpath.axes.PredicatedNodeTest.acceptNode
> (PredicatedNodeTest.java:458)
>         at org.apache.xpath.axes.AxesWalker.nextNode(AxesWalker.java:406)
>         at org.apache.xpath.axes.WalkingIterator.nextNode
> (WalkingIterator.java:176)
>         at org.apache.xpath.axes.NodeSequence.nextNode(NodeSequence.java:320)
>         at org.apache.xml.dtm.ref.DTMNodeIterator.nextNode
> (DTMNodeIterator.java:195)
>         at ApplyXPath.doMain(ApplyXPath.java:134)
>         at ApplyXPath.main(ApplyXPath.java:183)
> Have seen similar results attempting to use EXSLT functions via XPathAPI.
> The implication, planned or not, is that XPathAPI and CachedXPathAPI
> currently do not support the use of extension functions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to