Skip to content

Find a way to make ErrorProne work in IntelliJ IDEA #1069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #1669
php-coder opened this issue Jul 6, 2019 · 6 comments
Closed
Tracked by #1669

Find a way to make ErrorProne work in IntelliJ IDEA #1069

php-coder opened this issue Jul 6, 2019 · 6 comments
Assignees
Labels
area/documentation area/infrastructure resolution/gone Non-reproducible, obsolete, outdated issues
Milestone

Comments

@php-coder
Copy link
Owner

php-coder commented Jul 6, 2019

Compilation fails with the following error when it's being run in IDEA:

Error:java: java.lang.RuntimeException: java.lang.NoSuchMethodError: com.sun.tools.javac.util.JavacMessages.add(Lcom/sun/tools/javac/util/JavacMessages$ResourceBundleHelper;)V

It's a known issue (google/error-prone#535) and it seems like installing ErrorProne plugin (https://errorprone.info/docs/installation) should solve it. Need to test it and update documentation.

If it doesn't work, we should mention it in the documentation (for instance, in README.md) anyway.

Reported by @mukeshk

@php-coder
Copy link
Owner Author

A way to activate a certain Maven profile only within IDEA: https://stackoverflow.com/questions/24760387/activate-certain-maven-profile-in-intellij-idea-only

@php-coder php-coder added this to the 0.4.3 milestone Dec 28, 2019
@php-coder php-coder modified the milestones: 0.4.3, next Jan 22, 2020
@peterdemaeyer
Copy link

I just ran into this when cloning a fresh santuario-java from Bitbucket.
"mvn clean install" works, but IntelliJ refuses to build it, even after I install the Error Prone Compiler plugin.
I haven't found a solution yet.

Information:javac 1.8.0_232 was used to compile java sources
Information:27/01/20 23:19 - Build completed with 4 errors and 0 warnings in 1 s 867 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)

@php-coder
Copy link
Owner Author

@peterdemaeyer Hey Peter and thanks for letting me know! Now I know that I'm not alone who has faced this :) It would be great to file an issue in IDEA issue tracker. If you would do this, please, let me know as well.

@jmayday
Copy link

jmayday commented Feb 15, 2020

I just ran into this when cloning a fresh santuario-java from Bitbucket.
"mvn clean install" works, but IntelliJ refuses to build it, even after I install the Error Prone Compiler plugin.
I haven't found a solution yet.

@peterdemaeyer did you amend settings accordingly?
image

@peterdemaeyer
Copy link

Ah, indeed, that was it, thanks!

@asm0dey
Copy link
Contributor

asm0dey commented Feb 17, 2020 via email

@php-coder php-coder self-assigned this Feb 9, 2024
@php-coder php-coder modified the milestones: next, 0.4.8 Feb 9, 2024
@php-coder php-coder added the resolution/gone Non-reproducible, obsolete, outdated issues label Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation area/infrastructure resolution/gone Non-reproducible, obsolete, outdated issues
Projects
None yet
Development

No branches or pull requests

4 participants