aspose file tools *
The moose likes XML and Related Technologies and the fly likes SAXReader.readStream error  - 'Nested exception: null' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "SAXReader.readStream error  - Watch "SAXReader.readStream error  - New topic
Author

SAXReader.readStream error - 'Nested exception: null'

Rajesh So
Ranch Hand

Joined: Oct 08, 2002
Posts: 141
Hi,

I have to deal with a strange error.

The XML file (Request file) is read from a FTP using SAXReader.readStream(ftpDirectory, filename);

The production system throws the following error. This error occurs only in rare circumstances. We don't know at what circumstance this error happens, except that the request XML file has a file size of 692736 bytes.
org.dom4j.DocumentException has a message 'Nested exception: null'. The developer who wrote this code has not written the print stack trace. The developer has foresaw this problem and has made a retry attempt to get the stream from start.
I could not reproduce the problem.

May I know what this error is and how to reproduce this problem.

Regards,
Rajesh

Note: I incorrectly posted the content in another .Thread. Sorry for that
Rajesh So
Ranch Hand

Joined: Oct 08, 2002
Posts: 141
Hi,

The code that is likely to throw the exception is as follows :



I have made some guesses. Could the problem be that there is a possible memory leak or out of memory?
Your suggestions will be very useful

Thanks,
Rajesh
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 547
    
    3
Maybe you should inform the forum which libraries you are using? SAXReader.readStream() is not in dom4j? What is ftp? What is ftp.getBinaryFile()? They don't seem to suggest you are not using Apache's commons-net neither... so what are they?

"Nested Exception: null" seems inviting you to check whether the "InputStream is" is null or something? before proceeding further...
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3742
    
  16
g tsuji wrote:"Nested Exception: null" seems inviting you to check whether the "InputStream is" is null or something? before proceeding further...

Actually it's more likely that the code has tried to print out the nested exception when there is no nested exception.
Something like
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SAXReader.readStream error - 'Nested exception: null'