Fix the error: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags during maven builds

Problem: Maven package gives this compile time error when using Open JDK.

Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [Help 1]

Reason: Lombok version included in the project seemingly had a dependency on Oracle JDK, which is fixed in 1.18.2

Fix: Upgrade lombok to 1.18.2 in the POM file.

		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.18.2</version>
			<scope>provided</scope>
		</dependency>
Kj
Kj [/.] Sreekumar programs computers as a hobby and profession. Into programming from his school days, Sree uses Codemarvels to key in facts and fixes he finds interesting while working on different projects. Some of the articles here give away a few shades of his philosophical leanings too.

Leave a Comment

Your email address will not be published. Required fields are marked *