You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/10/23 23:24:25 UTC
DO NOT REPLY [Bug 13910] New: -
Xerces-J 2.1+: NullPointerException while trying to replaceChild of Node
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=13910>.
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=13910
Xerces-J 2.1+: NullPointerException while trying to replaceChild of Node
Summary: Xerces-J 2.1+: NullPointerException while trying to
replaceChild of Node
Product: Xerces2-J
Version: 2.1.0
Platform: Sun
OS/Version: Solaris
Status: NEW
Severity: Normal
Priority: Other
Component: DOM
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: ycswyw@hotmail.com
Source code:
------------
Node parent=node.getParentNode();
parent.replaceChild(newnode, node);
(it works with Xerces-J 2.0, but fails with Xerces-J 2.1.0 & 2.2.0)
Exception stack trace:
----------------------
java.lang.NullPointerException
at org.apache.xerces.dom.NodeIteratorImpl.matchNodeOrParent(Unknown
Source)
at org.apache.xerces.dom.NodeIteratorImpl.removeNode(Unknown Source)
at org.apache.xerces.dom.DocumentImpl.removingNode(Unknown Source)
at org.apache.xerces.dom.ParentNode.internalRemoveChild(Unknown Source)
at org.apache.xerces.dom.ParentNode.replaceChild(Unknown Source)
at MyServlet.myMethod(...)
Problem context:
----------------
I'm using an XML with some namespaces, that has been parsed with a
DocumentBuilder created by a documentBuilderFactory with namespace awareness
set to false (to ignore them). But I don't know if this is the cause.
Platform:
---------
Sun Enterprise 450 / Solaris 8 / iPlanet Web Server 4.1SP9 (as servlet
container) / JDK 1.2.2
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org