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

App fails w/ classnotfound exception after restoring n/w connectivity

XMLWordPrintable

    • b01
    • x86
    • windows_2000

      I have attached a *simple* test case which loads a class from a jar
      file (test.jar). All the components involved (JRE, *.class, *.jar) are
      located on a network mapped drive on a Windows 2000 system. JRE version
      that was used was 1.4.2_03.

      When we run this program, the classloader loads a class "Test" from
      "test.jar" file. It will continue to load this class for 5 iterations
      for every return key pressed, followed by loading a second class
      "Test2" in an infinite loop (again with every return key).

      The problem here is if we remove the n/w connectivity between these
      interations and *restore* it back before trying to load the same/next
      class. The program will abort with a "classnotfound" exception.

      IMP: The problem is observed only when the JRE is also installed on a
      n/w mapped drive.

      Interestingly, on one of the Windows box that I verified this problem
      with, the native OS restores the access to the offlined n/w mapped
      drive *automatically*. So, in theory, we should not have had problem in
      loading class files from the jar file.

      A new version of the program "Loadernew.java" just lists the directory
      contents and it resumes listing the files and never throws any
      exception after the n/w connectivity is *restored*.

      So, the problem seems to be specific the Java side components related
      to the "Classloader" mechanism.

      I wrote a simple Hello World C program and copied the resulting "exe"
      to the n/w mapped drive. I did not see any probem when I disconnected
      and reconnected back the n/w cable while the program was in action. Of
      course, the "java.exe" is more complex and will have dependency on
      other DLL's which are also located on the n/w mapped drive.

            tmasunw Tao Ma (Inactive)
            gnagasunsunw Gopinath Nagasundara (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: