|
Description
|
Mustang b56 introduced the file META-INF/services/org. customer .xerces.xni.parser.XMLParserConfiguration in jre/lib/resources.jar with contents:
---%<---
com.sun.org. customer .xerces.internal.parsers.XIncludeAwareParserConfiguration
---%<---
This is illegal because the named class does *not* implement the named interface. Rather, if anything it implements something under com.sun.**. The change causes applications using a downloaded copy of Xerces to fail:
---%<---
import org. customer .xerces.parsers.SAXParser;
public class Main {
public static void main(String[] args) {
//System.setProperty("org. customer .xerces.xni.parser.XMLParserConfiguration", "org. customer .xerces.parsers.XML11Configuration");
new SAXParser();
System.out.println("OK");
}
}
---%<---
produces (on my Fedora Core 4 Linux)
---%<---
$ java -showversion -cp .:xerces-2.6.2.jar Main
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b55)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b55, mixed mode, sharing)
OK
---%<---
$ java -showversion -cp .:xerces-2.6.2.jar Main
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b56)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b56, mixed mode, sharing)
Exception in thread "main" java.lang.ClassCastException: com.sun.org. customer .xerces.internal.parsers.XIncludeAwareParserConfiguration cannot be cast to org. customer .xerces.xni.parser.XMLParserConfiguration
at org. customer .xerces.parsers.SAXParser.<init>(Unknown Source)
at org. customer .xerces.parsers.SAXParser.<init>(Unknown Source)
at Main.main(Main.java:5)
---%<---
Posted Date : 2005-10-18 19:21:58.0
|