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

NullPointerException in Classloader after network problems

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: vm-legacy
    • Labels:

      Description



      Name: skT88420 Date: 11/02/99


      java version "1.2.2"
      Classic VM (build JDK-1.2.2-W, native threads, symcjit)
      The default class loader fails with a NullPointerException, if the classpath is
      pointing to a network drive and the network connection broke down and was
      recovered afterwards. This effect only occurs if the JIT is switched on.

      Steps to reproduce:
      - save and compile the test code "Test.java" below (on machine 1)
      - map a network drive on another machine (2) to the directory where the class
      files are stored
      - start the program on the machine 2 with: "java -classpath (drive pointing to
      machine 1) Test"
      - unplug the network cable from machine 2 --> the program displays
      NoClassDefFoundErrors, which is correct
      - plug in the network cable for machine 2 again --> the program now displays
      NullPointerExceptions.

      The NullPointerExceptions do not occur if the JIT was switched off before
      starting the program (with "set java_compiler=blabla"). In this case, the
      program continues its execution correctly.

      Here is the test code (the large number of classes is just to have some time to
      play with the network cable):


      public class Test
      {
          public static void main(String[] args)
          {
              // start with a class "Demo0"
              Demo d = new Demo0();

              while (true)
              {
                  try
                  {
                      System.out.print("executing class " + d.getClass().getName()
      + "... ");
                      // force the class loader to load the next class
                      d = d.execute();
                      System.out.println("okay");
                  }
                  catch (Throwable ex)
                  {
                      ex.printStackTrace();
                  }
                  try {Thread.sleep(3000);}
                  catch (InterruptedException ie) {}
              }
          }
      }

      abstract class Demo{abstract Demo execute();}

      class Demo0 extends Demo {Demo execute(){return new Demo1();}}
      class Demo1 extends Demo {Demo execute(){return new Demo2();}}
      class Demo2 extends Demo {Demo execute(){return new Demo3();}}
      class Demo3 extends Demo {Demo execute(){return new Demo4();}}
      class Demo4 extends Demo {Demo execute(){return new Demo5();}}
      class Demo5 extends Demo {Demo execute(){return new Demo6();}}
      class Demo6 extends Demo {Demo execute(){return new Demo7();}}
      class Demo7 extends Demo {Demo execute(){return new Demo8();}}
      class Demo8 extends Demo {Demo execute(){return new Demo9();}}
      class Demo9 extends Demo {Demo execute(){return new Demo10();}}
      class Demo10 extends Demo {Demo execute(){return new Demo11();}}
      class Demo11 extends Demo {Demo execute(){return new Demo12();}}
      class Demo12 extends Demo {Demo execute(){return new Demo13();}}
      class Demo13 extends Demo {Demo execute(){return new Demo14();}}
      class Demo14 extends Demo {Demo execute(){return new Demo15();}}
      class Demo15 extends Demo {Demo execute(){return new Demo16();}}
      class Demo16 extends Demo {Demo execute(){return new Demo17();}}
      class Demo17 extends Demo {Demo execute(){return new Demo18();}}
      class Demo18 extends Demo {Demo execute(){return new Demo19();}}
      class Demo19 extends Demo {Demo execute(){return new Demo20();}}
      class Demo20 extends Demo {Demo execute(){return new Demo21();}}
      class Demo21 extends Demo {Demo execute(){return new Demo22();}}
      class Demo22 extends Demo {Demo execute(){return new Demo23();}}
      class Demo23 extends Demo {Demo execute(){return new Demo24();}}
      class Demo24 extends Demo {Demo execute(){return new Demo25();}}
      class Demo25 extends Demo {Demo execute(){return new Demo26();}}
      class Demo26 extends Demo {Demo execute(){return new Demo27();}}
      class Demo27 extends Demo {Demo execute(){return new Demo28();}}
      class Demo28 extends Demo {Demo execute(){return new Demo29();}}
      class Demo29 extends Demo {Demo execute(){return new Demo30();}}
      class Demo30 extends Demo {Demo execute(){return new Demo31();}}
      class Demo31 extends Demo {Demo execute(){return new Demo32();}}
      class Demo32 extends Demo {Demo execute(){return new Demo33();}}
      class Demo33 extends Demo {Demo execute(){return new Demo34();}}
      class Demo34 extends Demo {Demo execute(){return new Demo35();}}
      class Demo35 extends Demo {Demo execute(){return new Demo36();}}
      class Demo36 extends Demo {Demo execute(){return new Demo37();}}
      class Demo37 extends Demo {Demo execute(){return new Demo38();}}
      class Demo38 extends Demo {Demo execute(){return new Demo39();}}
      class Demo39 extends Demo {Demo execute(){return new Demo40();}}
      class Demo40 extends Demo {Demo execute(){return new Demo41();}}
      class Demo41 extends Demo {Demo execute(){return new Demo42();}}
      class Demo42 extends Demo {Demo execute(){return new Demo43();}}
      class Demo43 extends Demo {Demo execute(){return new Demo44();}}
      class Demo44 extends Demo {Demo execute(){return new Demo45();}}
      class Demo45 extends Demo {Demo execute(){return new Demo46();}}
      class Demo46 extends Demo {Demo execute(){return new Demo47();}}
      class Demo47 extends Demo {Demo execute(){return new Demo48();}}
      class Demo48 extends Demo {Demo execute(){return new Demo49();}}
      class Demo49 extends Demo {Demo execute(){return new Demo50();}}
      class Demo50 extends Demo {Demo execute(){return new Demo51();}}
      class Demo51 extends Demo {Demo execute(){return new Demo52();}}
      class Demo52 extends Demo {Demo execute(){return new Demo53();}}
      class Demo53 extends Demo {Demo execute(){return new Demo54();}}
      class Demo54 extends Demo {Demo execute(){return new Demo55();}}
      class Demo55 extends Demo {Demo execute(){return new Demo56();}}
      class Demo56 extends Demo {Demo execute(){return new Demo57();}}
      class Demo57 extends Demo {Demo execute(){return new Demo58();}}
      class Demo58 extends Demo {Demo execute(){return new Demo59();}}
      class Demo59 extends Demo {Demo execute(){return new Demo60();}}
      class Demo60 extends Demo {Demo execute(){return new Demo61();}}
      class Demo61 extends Demo {Demo execute(){return new Demo62();}}
      class Demo62 extends Demo {Demo execute(){return new Demo63();}}
      class Demo63 extends Demo {Demo execute(){return new Demo64();}}
      class Demo64 extends Demo {Demo execute(){return new Demo65();}}
      class Demo65 extends Demo {Demo execute(){return new Demo66();}}
      class Demo66 extends Demo {Demo execute(){return new Demo67();}}
      class Demo67 extends Demo {Demo execute(){return new Demo68();}}
      class Demo68 extends Demo {Demo execute(){return new Demo69();}}
      class Demo69 extends Demo {Demo execute(){System.exit(0); return null;}}
      (Review ID: 97337)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              skonchad Sandeep Konchady
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: