Hello,
when trying to parse an XML-file file.xml using linux-jdk-1.3.1 and
xerces-1.4.0 I encounter a file-not-found-error from time to time.
The relevant part of the code looks like:
public class SAXParserDemo {
...
// Instantiate a parser
XMLReader parser =
XMLReaderFactory.createXMLReader(
"org.apache.xerces.parsers.SAXParser");
...
// the String uri is the location of file.xml
parser.parse(uri);
...
The usage isQuote:}
java SAXParserDemo <uri>
Now, if I enter
java SAXParserDemo /path/to/nfs_mounted/file.xml
I get the error message
**Parsing Fatal Error**
Line: 0
URI: null
Message: File "contents.xml" not found.
Error in parsing: Fatal Error encountered
Whereas, if I enter
java SAXParserDemo file:///path/to/nfs_mounted/file.xml
everything works fine. Strangely, for the next few minutes, entering the
same command as above
java SAXParserDemo /path/to/nfs_mounted/file.xml
works fine, too. But only for some minutes. Thereafter, I encounter the
error message again. Also, if I use
java SAXParserDemo /path/to/local/file.xml
I get no error message. Using jdk-1.1.8, these problems don't appear at
all. Has anybody experienced a strange behaviour like this?
Best regards,
Ralph.
with "unsubscribe freebsd-java" in the body of the message