Saturday 3 August 2013

org.xml.sax.SAXParseException: Premature end of file



[Fatal Error] :1:1: Premature end of file.
org.xml.sax.SAXParseException: Premature end of file.
 at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:246)
 at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
 at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
 at com.javastoreroom.source.XmlReader.readAllXML(XmlReader.java:60)
 at com.javastoreroom.source.XmlReader.execute(XmlReader.java:342)
 at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
 at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)

When i am reading a hundred of .xml file using a thread , getting this error ([Fatal Error] :1:1: Premature end of file.)
i am google to known try few other correction (like close InputStream , Reset ) but getting again & again .When i try to
know the reason check my first test.xml file it's empty & create error here i am check file size (fXmlFile.length()>0) everything
works fine.

Hope this help you and save your some time :)

No comments:

Post a Comment