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

IllegalAccessError after Instrumentation.appendToBootstrapClassLoaderSearch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0
    • core-svc
    • sparc
    • solaris_9



      Name: js151677 Date: 05/27/2004


      FULL PRODUCT VERSION :
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
      Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      SunOS mary 5.9 Generic_112233-12 sun4u sparc SUNW,Sun-Blade-100

      A DESCRIPTION OF THE PROBLEM :
      A java.lang.IllegalAccessError is thrown when accessing an inner class after invoking appendToBootstrapClassLoaderSearch (".")

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      compile and run the program given with
      java -javaagent:Teste Teste


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      end


      ACTUAL -
      Exception in thread "main" java.lang.IllegalAccessError: tried to access class Teste+1 from class Teste
              at Teste.main(Teste.java:3)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class Teste {
          public static void main(String[] args) {
              new Teste() { };
              System.out.println("end");
          }

          public static void premain(String agentArgs, java.lang.instrument.Instrumentation instr) {
              instr.appendToBootstrapClassLoaderSearch(".");
          }
      }

      ---------- END SOURCE ----------
      (Incident Review ID: 275256)
      ======================================================================

            Unassigned Unassigned
            jssunw Jitender S (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: