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>

  

Comments

Leave a Reply

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