Issue during Java build using JDK 14 and Lombok 1.18.18:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project a-service: Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x363d3958) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x363d395**
?
Issue resolved due to build platform including incorrect image.
Hi, I'm using Java 16 and Spring Boot 2.4.4 and still getting the error. Is there anything I could do? I was earlier running same code on Java 11 and it worked fine.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project ybl-oastatusreport-spring-boot: Fatal
error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x5875de6a) cannot access class com.sun.tools.javac.processin
g.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x5875de6a -> [Help
1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) o
n project ybl-oastatusreport-spring-boot: Fatal error compiling
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
This should work if you use lombok 1.18.20
Most helpful comment
This should work if you use lombok 1.18.20