I have file maven.pom
<dependency>
<groupId>.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
I use many JDKs (Adoptium, Amazon Correcto) but did not success. Error
java: java.lang.ExceptionInInitializerError
com.sun.tools.javac.code.TypeTag :: UNKNOWN
How to fix it?
I have file maven.pom
<dependency>
<groupId>.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
I use many JDKs (Adoptium, Amazon Correcto) but did not success. Error
java: java.lang.ExceptionInInitializerError
com.sun.tools.javac.code.TypeTag :: UNKNOWN
How to fix it?
Share Improve this question edited Mar 25 at 9:40 Vy Do asked Mar 25 at 9:37 Vy DoVy Do 52.9k69 gold badges256 silver badges387 bronze badges 4- Which JDK version are you using? If JDK24, you need to wait for the next release of lombok (which is imminent). – rzwitserloot Commented Mar 25 at 10:05
- I tried 3 JDKs: Adoptium JDK 24, Amazon Corretto JDK 24, Oracle build of OpenJDK 24. All of 3 JDKs is not success with my Spring 3.4.4 (latest version of the time of writing) web-app what has Lombok. – Vy Do Commented Mar 25 at 10:09
- 1 Yes, it doesn't matter what you try. JDK24 is just now out. I'm a core maintainer of lombok: We haven't released the update that works with JDK24 yet, but we're going to do that real soon now. Open source, this is a hobby, nobody pays us, chill, etc. – rzwitserloot Commented Mar 25 at 10:48
- I agree, no problem. Nice to meet you! – Vy Do Commented Mar 25 at 10:57
1 Answer
Reset to default 1I researched many days. Because Lombok did not support, even latest version of Lombok at the time of writing is
<!-- https://mvnrepository/artifact/.projectlombok/lombok -->
<dependency>
<groupId>.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.36</version>
<scope>provided</scope>
</dependency>
(did not work)
. Please wait next release. See https://github/projectlombok/lombok/tags
https://github/projectlombok/lombok/pull/3840 (Please keep this question and answer, it will help many others who looking for solution, exactly looking for reason why error happens).
More information: Even use JDK 24, and set Java language level is 23, it will still cause error, must use JDK 23 with Java language level 23 with latest version of Lombok (at the time of writing).
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744206161a4563113.html
评论列表(0条)