HI I posted question earlier. Thanks Peter for answering... Here is the details of the code when it happens... While the code try to read the document it calls this XCBL class given below. Any help is appreciated. thanks. public class XCBL extends TPCXXmlWrapper {
public XCBL(Reader reader) throws java.io.IOException { super(reader); this.doc = getDocument(); this.root = getRoot(); } } ******************* TPCXXMLWrapper class ******************* public class TPCXXmlWrapper implements java.io.Serializable, Cloneable, XMLProducer { public TPCXXmlWrapper(Reader reader) throws IOException { this(loadFrom(reader)); } public static Document loadFrom(Reader reader) throws IOException { return loadFrom(new InputSource(reader)); } public static Document loadFrom(InputSource source) throws IOException { final String METHOD_NAME = "loadFrom"; try { org.apache.xerces.parsers.DOMParser parser = new org.apache.xerces.parsers.DOMParser(); parser.parse(source); Document doc = parser.getDocument(); return doc; } catch (Exception se) { if (source.getCharacterStream() != null) { String aLine = ""; StringBuffer stringbuffer = new StringBuffer(); try { java.io.BufferedReader buf = new java.io.BufferedReader(source.getCharacterStream()); if (buf != null) { while ((aLine = buf.readLine()) != null) { stringbuffer.append(aLine); } } } catch (Exception e) { stringbuffer.append("(Failed to read lines after this point due to exception: " + e.toString() + ")"); } TPCXLogger.log(CLASS_NAME, METHOD_NAME, TPCXLogger.PRIORITY_ERROR, "Failed to parse given InputSource. Exception: [" + se.getMessage() + "]", se); // this is where we log exception and getting message. } else { if (source.getByteStream() != null) { TPCXLogger.log(CLASS_NAME, METHOD_NAME, TPCXLogger.PRIORITY_ERROR, "Failed to parse given InputSource. Returning NULL. Stream is available for content document.", se); } else { TPCXLogger.log(CLASS_NAME, METHOD_NAME, TPCXLogger.PRIORITY_ERROR, "Failed to parse given InputSource. Returning NULL. No reader nor stream available for content document.", se); } } return null; } } Notice: This transmission is for the sole use of the intended recipient(s) and may contain information that is confidential and/or privileged. If you are not the intended recipient, please delete this transmission and any attachments and notify the sender by return email immediately. Any unauthorized review, use, disclosure or distribution is prohibited.