Skip to content
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

ErrorProne 2.9.0 with Java 8: "cannot access Response". Possible regression. #2654

Open
aaime opened this issue Oct 30, 2021 · 0 comments
Open

Comments

@aaime
Copy link

aaime commented Oct 30, 2021

I'm getting a weird error when using ErrorProne with Java 8 in a large multi-module maven project.
Most of the modules build fine (eventually reporting errors spotted by ErrorProne) but one gives a ... less than useful error message:

> ~/devel/git-gs/src/extension/netcdf-out (ep_290) $ mvn clean install -Perrorprone8 -nsu
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------< org.geoserver.extension:gs-netcdf-out >----------------
[INFO] Building WCS NetCDF output Module 2.21-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ gs-netcdf-out ---
[INFO] 
[INFO] --- git-commit-id-plugin:4.0.3:revision (default) @ gs-netcdf-out ---
[INFO] 
[INFO] --- directory-maven-plugin:0.3.1:highest-basedir (directories) @ gs-netcdf-out ---
[INFO] Highest basedir set to: /home/aaime/devel/git-gs/src
[INFO] 
[INFO] --- fmt-maven-plugin:2.4.0:format (default) @ gs-netcdf-out ---
[debug] Using AOSP style
[INFO] Processed 34 files (0 reformatted).
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ gs-netcdf-out ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO] Copying 8 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ gs-netcdf-out ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 25 source files to /home/aaime/devel/git-gs/src/extension/netcdf-out/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] error: cannot access Response
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.628 s
[INFO] Finished at: 2021-10-30T18:36:30+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project gs-netcdf-out: Compilation failure
[ERROR] error: cannot access Response
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

The errorprone8 profile sets the compiler up for using ErrorProne with Java 8:
https://github.com/geoserver/geoserver/blob/main/src/pom.xml#L2319
The same project has more than 100 other modules in the same build, that are working fine... this gs-netcdf-out one has something "special" that makes it misbehave, but I could not say what.

The same module built fine with the previous ErrorProne version we were using, 2.3.4.
I've also run the Maven build with -X, to get debugging output... I don't see anything useful, but maybe you'll spot something:
debug.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant