I am facing this error while running command: mvn clean install -DskipTests

The error: class lombok.javac.apt.LombokProcessor (in unnamed module @0x7e7740a5) 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 @0x7e7740a5

I tried to resolve it by following steps mentioned here: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment

But it didn't worked for me. Please let me know what I am missing

1

There are 1 best solutions below

2
nahueldl On

You should either:

  • Update your Lombok version, to a version that doesn't try to access that class, which is no longer public.
  • Lower the SDK version used by maven (you can look at it by running mvn -v), to 1.8 for example.