GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — IntelliJ fails to build GJF due to ErrorProne+Java8 · Issue #417 · google/google-java-format

IntelliJ fails to build GJF due to ErrorProne+Java8 #417

New issue
Copy link
New issue
Copy link
Closed
Closed
IntelliJ fails to build GJF due to ErrorProne+Java8#417
Copy link

Description

@cgrushko
cgrushko
opened on Nov 12, 2019
Issue body actions

Repro:

  1. Load the pom.xml file in IntelliJ
  2. Attempt to run tests inside IntelliJ

Observe:

Information:java: An exception has occurred in the compiler (1.8.0_181). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
Information:java:   at com.sun.tools.javac.main.Main.compile(Main.java:473)
Information:java:   at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
Information:java:   at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
Information:java:   at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:190)
Information:java:   at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:459)
Information:java:   at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:329)
Information:java:   at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:254)
Information:java:   at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:212)
Information:java:   at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1328)
Information:java:   at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1008)
Information:java:   at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1075)
Information:java:   at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:969)
Information:java:   at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:798)
Information:java:   at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:380)
Information:java:   at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:178)
Information:java:   at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:139)
Information:java:   at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:302)
Information:java:   at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:135)
Information:java:   at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:228)
Information:java:   at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
Information:java:   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
Information:java:   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Information:java:   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Information:java:   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Information:java:   at java.lang.Thread.run(Thread.java:748)
Information:java:   at com.sun.tools.javac.main.Main.compile(Main.java:470)
Information:java:   ... 24 more
Information:java: Errors occurred while compiling module 'google-java-format'
Information:javac 1.8.0_181 was used to compile java sources
Information:2019-11-12 12:08 - Build completed with 4 errors and 1 warning in 2 s 838 ms
Error:java: java.lang.RuntimeException: java.lang.NoSuchMethodError: com.sun.tools.javac.util.JavacMessages.add(Lcom/sun/tools/javac/util/JavacMessages$ResourceBundleHelper;)V
Error:java: Caused by: java.lang.NoSuchMethodError: com.sun.tools.javac.util.JavacMessages.add(Lcom/sun/tools/javac/util/JavacMessages$ResourceBundleHelper;)V
Error:java:     at com.google.errorprone.BaseErrorProneJavaCompiler.setupMessageBundle(BaseErrorProneJavaCompiler.java:202)
Error:java:     at com.google.errorprone.ErrorProneJavacPlugin.init(ErrorProneJavacPlugin.java:40)

System information:

image

Things to note -

  1. mvn install succeeds in building GJF.
  2. The IntelliJ project was created from pom.xml

Workaround -

  1. The problem goes away if I remove the compiler parameters in IntelliJ (bottom of Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler)

Activity

  1. cushon commented on Nov 14, 2019

    @cushon
    cushon
    on Nov 14, 2019
    Collaborator
    More actions

    It looks like this configuration isn't getting pick up:

    google-java-format/pom.xml

    Line 267 in bd17670

    <arg>-J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${javac.version}/javac-${javac.version}.jar</arg>

    The easiest work-around might be to run on JDK 11.

  2. tbroyer commented on Nov 14, 2019

    @tbroyer
    tbroyer
    on Nov 14, 2019
    Contributor
    More actions

    Would it work with IntelliJ's ErrorProne plugin?

  3. cgrushko commented on Nov 14, 2019

    @cgrushko
    cgrushko
    on Nov 14, 2019 via email
    ContributorAuthor
    More actions
    I think it might; I think I had it installed at some point and then the problem went away. Still, that's another complication, especially if I want to use GJF as a library.
    …
    On Wed, Nov 13, 2019 at 11:01 PM Thomas Broyer ***@***.***> wrote: Would it work with IntelliJ's ErrorProne plugin? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#417?email_source=notifications&email_token=AAPH6YK5NGBZN3322DPKJKDQTTZWLA5CNFSM4JMBKC22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEAZ5HQ#issuecomment-553754270>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAPH6YITQQBCBRZS5BE6CTDQTTZWLANCNFSM4JMBKC2Q> .
  4. cushon commented on Nov 20, 2019

    @cushon
    cushon
    on Nov 20, 2019
    Collaborator
    More actions

    You could also try manually activating the jdk8 maven profile in IntelliJ (https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles).

  5. cushon commented on Dec 19, 2019

    @cushon
    cushon
    on Dec 19, 2019
    Collaborator
    More actions

    Did enabling the jdk8 profile make a difference?

  6. cgrushko commented on Dec 23, 2019

    @cgrushko
    cgrushko
    on Dec 23, 2019
    ContributorAuthor
    More actions

    Enabling the jdk8 profile didn't help, the error remains (the profile was enabled by default for me)
    (Sorry for the delay)

  7. cushon commented on Oct 28, 2025

    @cushon
    cushon
    on Oct 28, 2025
    Collaborator
    More actions

    Closing out since JDK 8 is not longer supported. Sorry for not getting to the bottom of this!

  8. cushon
    closed this as completedon Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.