We have a corrupt jar file containing (in this case) SAX classes.
The classes fail to load with no warning that we are traversing a corrupt Jar file in our classpath:
(5.9)$ java -classpath ./saxorig.jar:. Test
java.lang.ClassNotFoundException: org.xml.sax.Parser
-verbose:class does not list saxorig.jar at all: this was the only clue that it was a corrupt jar/zip file.
Using 1.3.1, the output is as above: ClassNotFoundException. In 1.4.2 and 1.5, the SAX classes are found in rt.jar (ie. class is found, but the _wrong_ class is found: the jar file prefixed in our bootclasspath is ignored).
The original problem was with 1.3.1 and applets in the plugin, but appears to be common to all versions including 1.5: a corrupt Jar file is simply ignored with no warning.
(The fact that this genuine "found in the wild" corrupt jar/zip file contains classes which are now in rt.jar rather spoils the testcase a little when run in 1.4.2/1.5.)
###@###.### 11/2/04 16:02 GMT
###@###.### 2005-1-25 19:49:35 GMT
The classes fail to load with no warning that we are traversing a corrupt Jar file in our classpath:
(5.9)$ java -classpath ./saxorig.jar:. Test
java.lang.ClassNotFoundException: org.xml.sax.Parser
-verbose:class does not list saxorig.jar at all: this was the only clue that it was a corrupt jar/zip file.
Using 1.3.1, the output is as above: ClassNotFoundException. In 1.4.2 and 1.5, the SAX classes are found in rt.jar (ie. class is found, but the _wrong_ class is found: the jar file prefixed in our bootclasspath is ignored).
The original problem was with 1.3.1 and applets in the plugin, but appears to be common to all versions including 1.5: a corrupt Jar file is simply ignored with no warning.
(The fact that this genuine "found in the wild" corrupt jar/zip file contains classes which are now in rt.jar rather spoils the testcase a little when run in 1.4.2/1.5.)
###@###.### 11/2/04 16:02 GMT
###@###.### 2005-1-25 19:49:35 GMT
- relates to
-
JDK-6189465 More error detail when encountering problems reading Zip files.
- Open
-
JDK-6190121 Jar is not usable for testing integrity of Jar files.
- Closed
-
JDK-6239036 (cl) classLoader must be able to provide better diagnostics when encountering a malformed JAR
- Open