-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
5.0
-
x86
-
windows_xp
Name: gm110360 Date: 02/25/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
My application does not read XML files anymore. With previous JREs the application did the following:
System.setProperty("org.xml.sax.driver","org.apache.crimson.parser.XMLReaderImpl");
XMLReader r = XMLReaderFactory.createXMLReader();
r.setContentHandler(new XmlBackupSetReader(this));
r.parse(new InputSource(new FileInputStream(file)));
where XmlBackupSetReader is a class extending org.xml.sax.helpers.DefaultHandler
When doing the above with JRE 1.5 Beta 1 the exception "SAX2 driver class org.apache.crimson.parser.XMLReaderImpl not found" is thrown.
It seems that the SAX2 driver was part of the JRE 1.4.x but is not part of 1.5 up to now...
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
try to open an arbitrary XML file with a class extending org.xml.sax.helpers.DefaultHandler by using the following code snippet
System.setProperty("org.xml.sax.driver","org.apache.crimson.parser.XMLReaderImpl");
XMLReader r = XMLReaderFactory.createXMLReader();
r.setContentHandler(new XmlBackupSetReader(this));
r.parse(new InputSource(new FileInputStream(file)));
where XmlBackupSetReader is a class extending org.xml.sax.helpers.DefaultHandler
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the result would have been that the XML parser drives the callback methods of the class extending org.xml.sax.helpers.DefaultHandler
ACTUAL -
an exception is thrown "SAX2 driver class org.apache.crimson.parser.XMLReaderImpl not found" when attempting to parse the XML file as described above
ERROR MESSAGES/STACK TRACES THAT OCCUR :
SAX2 driver class org.apache.crimson.parser.XMLReaderImpl not found
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
see above
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
distribute the parser separate from the JRE with the individual application (not nice)
(Incident Review ID: 239838)
======================================================================