I am getting very strange \"Premature end of file.\" exception for last few days on one of our servers. The same configuration XML works fine on another server. We
Are you sure that the XML file is in the correct character encoding? FileReader
always uses the platform default encoding, so if the "working" server had a default encoding of (say) ISO-8859-1 and the "problem" server uses UTF-8 you would see this error if the XML contains any non-ASCII characters.
Does it work if you create the InputSource from a FileInputStream instead of a FileReader?