This error occured "tackTrace: org.xml.sax.SAXParseException: Premature end of file." cuz i was reading multiple xml files from disk and one of them was empty which cause of this error.
i used following statement
docBuilder.parse(new InputSource(reader))