xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikael Helbo Kjær <...@dia.dk>
Subject A very strange error using Xpath implementation in Xalan 0_20_0
Date Tue, 07 Mar 2000 14:48:39 GMT
I`ve encountered a very strange error while using the XPath engine from
Xalan 0.20.0 and Xerces 1.0.2 running in JDK1.2.2 with the HotSpot 1.0.1.
When I call the XPath engine like this:
          XPathSupport xps = new XercesLiaison();
          PrefixResolver pr = new PrefixResolverDefault(m_nDocumentElement);
      
          XPath xpath = new XPath();
          XPathProcessorImpl xpparser = new XPathProcessorImpl(xps);
          xpparser.initXPath(xpath, strXPATH,  pr);
          XObject list = xpath.execute(xps,m_nDocumentElement,pr); <--error
happens in this line
          nl = list.nodeset();
I`ve tested my the m_nDocumentElement variable it isn`t null, but I still
get this following error:

java.lang.NullPointerException
        at
org.apache.xerces.dom.NamedNodeMapImpl.findNamePoint(NamedNodeMapImpl
.java:770)
        at
org.apache.xerces.dom.NamedNodeMapImpl.getNamedItem(NamedNodeMapImpl.
java:222)
        at
org.apache.xerces.dom.ElementImpl.setupDefaultAttributes(ElementImpl.
java:731)
        at
org.apache.xerces.dom.DeferredElementImpl.synchronizeData(DeferredEle
mentImpl.java:154)
        at org.apache.xerces.dom.NodeImpl.getNodeName(NodeImpl.java:229)
        at
org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.getNamespaceOfNode
(XMLParserLiaisonDefault.java:1073)
        at
org.apache.xalan.xpath.xdom.XercesLiaison.getNamespaceOfNode(XercesLi
aison.java:349)
        at
org.apache.xalan.xpath.SimpleNodeLocator.nodeTest(SimpleNodeLocator.j
ava:1688)
        at
org.apache.xalan.xpath.SimpleNodeLocator.findChildren(SimpleNodeLocat
or.java:720)
        at
org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java:
402)
        at
org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java:
495)
        at
org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java:
495)
        at
org.apache.xalan.xpath.SimpleNodeLocator.locationPath(SimpleNodeLocat
or.java:295)
        at org.apache.xalan.xpath.XPath.locationPath(XPath.java:964)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:1381)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:1354)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:311)
        at org.apache.xalan.xpath.XPath.execute(XPath.java:274)
        at com.dia.XPathTest.getDocument(CacheImpl.java:119)

Mikael Helbo Kjær
Software Developer @ DIA a/s

Mime
View raw message