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>

  

Sreekumar Kj
Sreekumar (KJ) has been a hobby programmer from school days. Codemarvels is his personal blog from the year 2010, where he writes about technology, philosophy, society and a bit about physics. He now runs a conversational AI company - DheeYantra - focusing his efforts to help businesses improve operational efficiency using digital employees powered by AI.

Leave a Comment

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