java.lang.IllegalAccessError: tried to access class$2 from class

JDK Bug System | Webbug Group | 2 years ago
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 ( 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$2 from class at at at at at at at at at at at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess( at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile( at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute( at org.apache.maven.plugin.compiler.TestCompilerMojo.execute( at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo( at org.apache.maven.lifecycle.internal.MojoExecutor.execute( at org.apache.maven.lifecycle.internal.MojoExecutor.execute( at org.apache.maven.lifecycle.internal.MojoExecutor.execute( at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject( at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject( at at org.apache.maven.lifecycle.internal.LifecycleStarter.execute( at org.apache.maven.DefaultMaven.doExecute( at org.apache.maven.DefaultMaven.execute( at org.apache.maven.cli.MavenCli.execute( at org.apache.maven.cli.MavenCli.doMain( at org.apache.maven.cli.MavenCli.main( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced( at org.codehaus.plexus.classworlds.launcher.Launcher.launch( at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode( at org.codehaus.plexus.classworlds.launcher.Launcher.main( [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 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 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$2 from class
  2. 0

    GitHub comment 82#268466749

    GitHub | 3 months ago | aojava
    java.lang.IllegalAccessError: tried to access class$3 from class
  3. 0

    Error while processing annotations

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

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalAccessError

      tried to access class$2 from class

    2. Java Tools
      10 frames
    3. Plexus Javac Component
      1. org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(
      2. org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(
      2 frames
    4. Apache Maven Compiler Plugin
      1. org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(
      2. org.apache.maven.plugin.compiler.TestCompilerMojo.execute(
      2 frames
    5. Maven Plugin
      1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(
      1 frame
    6. Maven Core
      1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(
      2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(
      3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(
      4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
      5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
      7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(
      8. org.apache.maven.DefaultMaven.doExecute(
      9. org.apache.maven.DefaultMaven.execute(
      9 frames
    7. M3 Interceptor
      1. org.apache.maven.cli.MavenCli.execute(
      2. org.apache.maven.cli.MavenCli.doMain(
      3. org.apache.maven.cli.MavenCli.main(
      3 frames
    8. Java RT
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(
      4. java.lang.reflect.Method.invoke(
      4 frames
    9. Plexus
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(
      3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(
      4. org.codehaus.plexus.classworlds.launcher.Launcher.main(
      4 frames