classpathx-xml
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Classpathx-xml] Bug in gnu.xml.dom.DomNode.appendChild()


From: Christoph PERMES
Subject: [Classpathx-xml] Bug in gnu.xml.dom.DomNode.appendChild()
Date: Sun, 16 Oct 2005 17:49:21 +0200 (CEST)

This simple Java DOM example causes an exception when calling method
appendChild():

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.newDocument();
Element element = doc.createElement("element");
doc.appendChild(element); // this line causes an exception

When compiling this simple program with gcj following Exception occures:

gnu.xml.dom.DomDOMException: The node was not found in that context.
Node Name: element
gnu.xml.dom.DomDOMException: The node was not found in that context.
Node Name: element
at gnu.xml.dom.DomNode.removeChild(org.w3c.dom.Node)
   (/usr/lib/libgcj.so.6.0.0)
   at XMLTest.main(java.lang.String[]) (Unknown Source)
   at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)

My gcj version is
gcj (GCC) 4.0.1 20050727 (Red Hat 4.0.1-5)
but the error also occures with other gcj-4.0 compilers

When compiling the program into a class-file and executing it with gij
it works fine.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]