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

java.lang.IllegalAccessError: class com.google.errorprone.BaseErrorProneJavaCompiler (in unnamed module @0x6038f9c) cannot access class com.sun.tools.javac.api.BasicJavacTask (in module jdk.compiler)

XMLWordPrintable

    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      $ java -version
      java version "21" 2023-09-19 LTS
      Java(TM) SE Runtime Environment (build 21+35-LTS-2513)
      Java HotSpot(TM) 64-Bit Server VM (build 21+35-LTS-2513, mixed mode, sharing)


      A DESCRIPTION OF THE PROBLEM :
      [INFO] Compiling 1 source file with javac [debug target 21 module-path] to target\classes
      An exception has occurred in the compiler (21). Please file a bug against the Java compiler via the Java bug reporting page (https://bugreport.java.com) after checking the Bug Database (https://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
      java.lang.IllegalAccessError: class com.google.errorprone.BaseErrorProneJavaCompiler (in unnamed module @0x6038f9c) cannot access class com.sun.tools.javac.api.BasicJavacTask (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.api to unnamed module @0x6038f9c
      at com.google.errorprone.BaseErrorProneJavaCompiler.addTaskListener(BaseErrorProneJavaCompiler.java:95)
      at com.google.errorprone.ErrorProneJavacPlugin.init(ErrorProneJavacPlugin.java:34)


      REGRESSION : Last worked in version 20.0.2

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Clone https://github.com/kolotyluk/files
      mvn clean test

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Success
      ACTUAL -
      An exception has occurred in the compiler (21). Please file a bug against the Java compiler via the Java bug reporting page

      ---------- BEGIN SOURCE ----------
      Clone https://github.com/kolotyluk/files
      ---------- END SOURCE ----------

      FREQUENCY : always


            adev Anupam Dev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: