Error message is:
Error:java: java.lang.ExceptionInInitializerError
com.sun.tools.javac.code.TypeTags
If you use Maven error message is the same.
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.449 s [INFO] Finished at: 2020-02-26T08:34:45-05:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project core-java-annotations: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [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/MojoExecutionException
may I know what is the reason?
This may be because your compiler environments too high. But your dependence
<dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.6.12</version> <scope>provided</scope> </dependency>
Due to low.
The solution may be to drop your compiler JDK 1.8.
Org.projectlombok or upgrade to the latest version.
For example, we in IntelliJ, a 1.8-compiled code, there is no error.
https://www.cwiki.us/display/JAVAZH/questions/57934274/answers/57934279