java.lang.IllegalAccessError: tried to access class com.sun.tools.javac.parser.JavacParser$2 from class com.sun.tools.javac.parser.JavacParser

JDK Bug System | Webbug Group | 2 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    FULL PRODUCT VERSION : java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode) ADDITIONAL OS VERSION INFORMATION : Linux 3.2.0-74-generic #109-Ubuntu SMP Tue Dec 9 16:45:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux EXTRA RELEVANT SYSTEM CONFIGURATION : mvn -version Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T16:58:10-04:00) Java version: 1.8.0_25, vendor: Oracle Corporation Default locale: en_US, platform encoding: UTF-8 A DESCRIPTION OF THE PROBLEM : [INFO] Compiling 1 source file to TMP/tmp/bug/project/target/test-classes An exception has occurred in the compiler (1.8.0_25). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. java.lang.IllegalAccessError: tried to access class com.sun.tools.javac.parser.JavacParser$2 from class com.sun.tools.javac.parser.JavacParser at com.sun.tools.javac.parser.JavacParser.modifiersOpt(JavacParser.java:2793) at com.sun.tools.javac.parser.JavacParser.typeDeclaration(JavacParser.java:3172) at com.sun.tools.javac.parser.JavacParser.parseCompilationUnit(JavacParser.java:3112) at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:628) at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:665) at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857) at com.sun.tools.javac.main.Main.compile(Main.java:523) at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129) at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138) at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126) at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169) at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:785) at org.apache.maven.plugin.compiler.TestCompilerMojo.execute(TestCompilerMojo.java:152) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] An unknown compilation problem occurred ADDITIONAL REGRESSION INFORMATION: java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode) STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : wget http://mir.cs.illinois.edu/gliga/tmp/bug.tgz tar xfvz bug.tgz cd bug ./s EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Successful compilation ACTUAL - See description REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- See the instructions to reproduce the bug. Note that we minimized the example significantly. There is only one java file and one package-info.java. However, we did not reproduce it without Maven. ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : The interaction between earlier versions of Maven (3.0.x) and java compiler do lead to the bug reported here. However, Maven (3.2.x and later) always lead to the bug.

    JDK Bug System | 2 years ago | Webbug Group
    java.lang.IllegalAccessError: tried to access class com.sun.tools.javac.parser.JavacParser$2 from class com.sun.tools.javac.parser.JavacParser
  2. 0

    GitHub comment 82#268466749

    GitHub | 3 months ago | aojava
    java.lang.IllegalAccessError: tried to access class com.sun.tools.javac.comp.MemberEnter$3 from class com.sun.tools.javac.comp.MemberEnter
  3. 0

    Error while processing annotations

    Oracle Community | 5 years ago | User376242
    java.lang.IllegalAccessError: tried to access class com.sun.tools.javac.comp.Check$4 from class com.sun.tools.javac.comp.Check
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalAccessError

      tried to access class com.sun.tools.javac.parser.JavacParser$2 from class com.sun.tools.javac.parser.JavacParser

      at com.sun.tools.javac.parser.JavacParser.modifiersOpt()
    2. Java Tools
      JavacTaskImpl.call
      1. com.sun.tools.javac.parser.JavacParser.modifiersOpt(JavacParser.java:2793)
      2. com.sun.tools.javac.parser.JavacParser.typeDeclaration(JavacParser.java:3172)
      3. com.sun.tools.javac.parser.JavacParser.parseCompilationUnit(JavacParser.java:3112)
      4. com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:628)
      5. com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:665)
      6. com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950)
      7. com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
      8. com.sun.tools.javac.main.Main.compile(Main.java:523)
      9. com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
      10. com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
      10 frames
    3. Plexus Javac Component
      JavacCompiler.performCompile
      1. org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
      2. org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169)
      2 frames
    4. Apache Maven Compiler Plugin
      TestCompilerMojo.execute
      1. org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:785)
      2. org.apache.maven.plugin.compiler.TestCompilerMojo.execute(TestCompilerMojo.java:152)
      2 frames
    5. Maven Plugin
      DefaultBuildPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      1 frame
    6. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      6. org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
      9. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
      9 frames
    7. M3 Interceptor
      MavenCli.main
      1. org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
      2. org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
      3. org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
      3 frames
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:483)
      4 frames
    9. Plexus
      Launcher.main
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      4. org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      4 frames