Hi to all I'm using WebSphere 6.1 (that already includes the Xerces library
XML4J version 4.4.12) We have recently had a problem using the class
org.apache.xerces.dom.DeepNodeListImpl. This is the stack trace: 0000002c
SystemErr R java.lang.NullPointerException0000002c SystemErr R at
org.apache.xerces.dom.DeepNodeListImpl.nextMatchingElementAfter(Unknown
Source)0000002c SystemErr R at
org.apache.xerces.dom.DeepNodeListImpl.item(Unknown Source)0000002c SystemErr
R at org.apache.xerces.dom.DeepNodeListImpl.getLength(Unknown Source) We
have parsed a XML obtained from a file, and we try to access to a element of
that XML to take its value: // We open a fileInputStream is = new
FileInputStream(fileName);Reader input = new BufferedReader(new
InputStreamReader(is))// parses the fileDOMParser parser = new
DOMParser();parser.parse(new InputSource(input));org.w3c.dom.Document doc =
parser.getDocument();org.w3c.dom.Element e = doc.getDocumentElement()// Look
out for a element in the XMLNodeList nl = e.getElementsByTagName(<some_string>);
if (nl == null || nl.getLength() < 1)
as you can see the NodeList is not null. The NodeList object is a
DeepNodeListImpl object initialized.
When it goes to get the length of the NodeList element it throws a
NullPointerException, as the stack trace shows.
We really don't know why this exception has occurred. Any help?.
This problem happens in a PRODUCTION environment and we don't know if is a
specific one or it will happen always.
Lot of thanks in advance
_________________________________________________________________
Diviértete y aprende con el juego de palabras del Abecedario
http://www.vivelive.com/abecedario/