Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6189491

Silent failure of corrupt Jar/Zip files during classloading yields poor diagnosability.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.3.1_12
    • Fix Version/s: 6
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b23
    • CPU:
      generic
    • OS:
      solaris_8

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ksrini Kumar Srinivasan
                Reporter:
                kevinw Kevin Walls
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: