Submitted On 22-FEB-2007
jglick
How is this a bug? The listed URI is simply invalid. Use
reader.parse(new File("C:\\space error\\x.xml").toURI().toString());
Submitted On 09-MAR-2007
jon_ralph
This is a bug since this code works on all prior versions before 1.6
Submitted On 16-MAR-2007
aaubry
Try to parse the file directly or the input stream related to the file. It should works.
The following code is working withe JDK 1.5
...
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
SAXParser parser = factory.newSAXParser();
parser.parse(file, handler);
....
Though, parsing the same stream from a String object is not working and raises the same exception you have.
Alexandre
Submitted On 27-MAR-2007
java80
I have faced the same problem.Had some code that use to work fine on 1.5 and today when i tried it with 1.6 it failed,and google bought me here.....
Mick
Submitted On 12-APR-2007
It seems that the bug is also in Java version "C:\Program Files\Java\jre1.5.0_01\bin\java.exe"
on the platform Windows(R) Server 2003, Enterprise Edition
OS Version: 5.2.3790 Service Pack 1 Build 3790
because the same bat file works fine on Windows XP.
my.bat:
set xercesDIR=c:/work/
"C:\Program Files\Java\jre1.5.0_01\bin\java.exe" -classpath "%xercesDIR%xjparse-1.0.jar;%xercesDIR%resolver.jar" com.nwalsh.parsers.xjparse -d 5 -s -c "%xercesDIR%myxmlcatalog.xml" "%xercesDIR%myfiletovalidate.xml"
Work Around is pass on command line options url instead of path, example:
"file:///%xercesDIR%myfiletovalidate.xml"
Submitted On 09-SEP-2008
Event though you use the suggested workaround:
reader.parse(new File("C:\\space error\\x.xml").toURI().toString());
you will face another problem:
if the referenced DTD is local you get a FileNotFoundException
i.e: <!DOCTYPE chapter SYSTEM "../dtds/chapter.dtd">
Submitted On 09-OCT-2008
David.F
I had a line with same exception :
document = builder.parse(translationFileName);
I succeed to get rid of error with 'new File(...)':
document = builder.parse(new File(translationFileName));
Submitted On 27-FEB-2009
chamness
Sill an issue in:
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)
At a minimum, there should be a more specific error message.
Submitted On 26-MAR-2009
wwwjames
Which update release of JDK 6 has the fix ?
We just tried to verify the fix with 1.6.0_13-b03 and it is still broken.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|