-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0, 1.4.1
-
beta2
-
generic, sparc
-
generic, solaris_9
-
Verified
Name: eaR10174 Date: 03/09/2001
org.xml.sax.helpers.ParserFactory.makeParser(String className) throws ClassNotFoundException although there is
the class with className in the classpath. The sample program awaits for ClassCastException (See test.java below).
This bug appears in build jdk1.4.0beta-b54 and affects the test in TCK JAXP 1.1
api/com/sun/xml/tests/sax/helpers/ParserFactoryTest.java#negativeMakeParser009
------------------------------------test.java-----------------------------
package tests;
import org.xml.sax.helpers.ParserFactory;
public class test {
public static void main(String argv[]) {
try {
ParserFactory.makeParser("tests.test");
} catch (Exception e) {
System.out.println(e);
}
}
}
---------------------------------------------------------------------------
---------------------------------------------------------------------------
% java -showversion -cp .:$CLASSPATH tests.test
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b54)
Java HotSpot(TM) Client VM (build 1.4beta-B54, mixed mode)
java.lang.ClassNotFoundException: tests/test
---------------------------------------------------------------------------
======================================================================
Name: inR10064 Date: 03/19/2001
Another sample with valid SAX 1 PArser shows that the bug may prevent
user of SAX1-based JAva app from moving to J2SE 1.4 platform . At least
such a user will spend hours in trying to configure parser for the app.
----------------------------------------- makeParser.java
package tests;
import org.xml.sax.helpers.ParserFactory;
public class makeParser {
static String pName = "com.sun.xml.parser.Parser";
public static void main(String argv[]) {
try {
System.out.println(" created: " + ParserFactory.makeParser(pName));
} catch (Exception e) {
System.out.println(e);
}
}
}
----------------------------------------- log for unbundled JAXP 1.1.1
___/export/home/inev/work/tmp/JAXP 18 ja -showversion -cp $JAXP/jaxp1.1.1/jaxp.jar:$JAXP/jaxp1.1.1/crimson.jar:$JAXP/jaxp1.0.1/parser.jar:clss tests.makeParser
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, interpreted mode)
created: com.sun.xml.parser.Parser@31f71a
___/export/home/inev/work/tmp/JAXP 19 l $JAXP/jaxp1.1.1
lrwxrwxrwx 1 inev 26 Mar 19 13:10 /export/ld25/java/dest/JAXP/jaxp1.1.1 -> jaxp-1.1.1-b23-16_mar_2001
___/export/home/inev/work/tmp/JAXP 20
----------------------------------------- log for jdk 1.4.0-beta-b55 ( bundled JAXP 1.1.1 )
___/export/home/inev/work/tmp/JAXP 249 ja -showversion -cp $JAXP/jaxp1.0.1/parser.jar:clss tests.makeParser
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b55)
Java HotSpot(TM) Client VM (build 1.4beta-B55, mixed mode)
java.lang.ClassNotFoundException: com/sun/xml/parser/Parser
___/export/home/inev/work/tmp/JAXP 250
-----------------------------------------
======================================================================
- duplicates
-
JDK-4463671 Class.forName0 failing for xerces.jar sample program
-
- Closed
-
- relates to
-
JDK-4424303 jdk1.4.0beta-b54 Class.newInstance() incorrectly throws IllegalAccessException
-
- Closed
-