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

ClassLoader does not load superclass and not initialize class

XMLWordPrintable

    • sparc
    • solaris_2.5



      Name: szC45993 Date: 01/19/98



      The jvm spec (5.1.2 Current Class or Interface Loaded by
      Class Loader) demands:

      "...
       When the class loader's loadClass method is invoked with the name of a class or interface that it has not yet loaded, the class loader must perform one of the following two operations in order to load the class or interface:

      - ...
       Invoking defineClass then causes the loadClass method of the class loader to be invoked recursively in order to load the superclass of the newly defined class or interface. The fully qualified path name of the superclass is derived from the super_class item in the class file format.
       When the superclass is loaded in, the second argument to loadClass is false, indicating that the superclass is not to be linked and initialized immediately.

      - ...

       After the class or interface and its superclasses have been loaded successfully, if the second argument to loadClass is true the class or interface is linked and initialized."


      However, the JCK ClassInterf03301 test discovers
      that superclass loading and initializing process are not
      initiated in the following cases (need to note, such
      behaviour corresponds to new VM spec but even if
      jdk1.2b3* corresponds to new spec then
      the result for jdk1.2b3a on WinNT must be equal to
      result for jdk1.2b3a on solaris where test runs successful):


                            LOG1 (jdk1.2b3a, WinNT) :


      call: javasoft.sqe.harness.lib.ExecJCKTestOtherJVMCmd CLASSPATH=\D:\a2wescafe12e\classes;\K:\JCK-12e\tests\..\classes SystemRoot=C:\winnt HOME=C:\ E:\jdk12a\bin\java -verify javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.ClassInterf03301
      command result: Failed. test failed
      ----------ref:execute(19/1148)----------
      ********ClassInterf03301.run*********
      ( ###loadClass: javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt true
      ( %%%loadClassData: Intrmdt
      ) %%%loadClassData: Intrmdt
      ( @@@defineClass: Intrmdt
      ( ###loadClass: java.lang.Object false
      ( $$$findSystemClass: java.lang.Object
      ) $$$findSystemClass: java.lang.Object
      ) ###loadClass: java.lang.Object false
      ( ###loadClass: java.lang.Runnable false
      ( $$$findSystemClass: java.lang.Runnable
      ) $$$findSystemClass: java.lang.Runnable
      ) ###loadClass: java.lang.Runnable false
      ) @@@defineClass: Intrmdt
      ( +++resolveClass: class javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt
      ) +++resolveClass: class javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt
      ) ###loadClass: javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt true
      ERROR: The class (static) variables have not been initialized (when second argument of loadClass is equal to true)!
      -----#javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt#loadClass##java.lang.Object#loadClass##java.lang.Runnable#loadClass#-----
      ----------log:execute(0/0)----------
      test result: Failed. test failed



                           LOG2 (jdk1.2b3b, solaris) :


      call: javasoft.sqe.harness.lib.ExecJCKTestOtherJVMCmd CLASSPATH=/net/tapas/export1/testexec/results/b2cady12e_26/classes:/net/tapas/export1/testexec/JCK-12e/tests/../classes DISPLAY=cady:0.0 HOME=/home/rickr LD_LIBRARY_PATH=/net/tapas/export1/testexec/JCK-12e/tests/../lib:/net/tapas/export1/testexec/JCK-12e/tests/../lib_solaris: /net/tapas/export1/testexec/jdk12b/solaris/bin/java -verify javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.ClassInterf03301
      command result: Failed. test failed
      ----------ref:execute(19/1129)----------
      ********ClassInterf03301.run*********
      ( ###loadClass: javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt true
      ( %%%loadClassData: Intrmdt
      ) %%%loadClassData: Intrmdt
      ( @@@defineClass: Intrmdt
      ( ###loadClass: java.lang.Object false
      ( $$$findSystemClass: java.lang.Object
      ) $$$findSystemClass: java.lang.Object
      ) ###loadClass: java.lang.Object false
      ( ###loadClass: java.lang.Runnable false
      ( $$$findSystemClass: java.lang.Runnable
      ) $$$findSystemClass: java.lang.Runnable
      ) ###loadClass: java.lang.Runnable false
      ) @@@defineClass: Intrmdt
      ( +++resolveClass: class javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt
      ) +++resolveClass: class javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt
      ) ###loadClass: javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt true
      ERROR: The class (static) variables have not been initialized (when second argument of loadClass is equal to true)!
      -----#javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt#loadClass##java.lang.Object#loadClass##java.lang.Runnable#loadClass#-----
      ----------log:execute(0/0)----------
      test result: Failed. test failed


                                LOG3 (jdk1.2b3b, WinNT) :


      call: javasoft.sqe.harness.lib.ExecJCKTestOtherJVMCmd CLASSPATH=\D:\b2wescafe12e\classes;\K:\JCK-12e\tests\..\classes SystemRoot=C:\winnt HOME=C:\ E:\jdk12b\bin\java -verify javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.ClassInterf03301
      command result: Failed. test failed
      ----------ref:execute(19/1148)----------
      ********ClassInterf03301.run*********
      ( ###loadClass: javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt true
      ( %%%loadClassData: Intrmdt
      ) %%%loadClassData: Intrmdt
      ( @@@defineClass: Intrmdt
      ( ###loadClass: java.lang.Object false
      ( $$$findSystemClass: java.lang.Object
      ) $$$findSystemClass: java.lang.Object
      ) ###loadClass: java.lang.Object false
      ( ###loadClass: java.lang.Runnable false
      ( $$$findSystemClass: java.lang.Runnable
      ) $$$findSystemClass: java.lang.Runnable
      ) ###loadClass: java.lang.Runnable false
      ) @@@defineClass: Intrmdt
      ( +++resolveClass: class javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt
      ) +++resolveClass: class javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt
      ) ###loadClass: javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt true
      ERROR: The class (static) variables have not been initialized (when second argument of loadClass is equal to true)!
      -----#javasoft.sqe.tests.vm.constantpool.ClassInterf033.ClassInterf03301.Intrmdt#loadClass##java.lang.Object#loadClass##java.lang.Runnable#loadClass#-----
      ----------log:execute(0/0)----------
      test result: Failed. test failed



      Hook 5(hook5): test

      ======================================================================

            sliangsunw Sheng Liang (Inactive)
            zsssunw Zss Zss (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: