最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

lombok - Java web-app cannot compile with JDK 24: java: java.lang.ExceptionInInitializerError , com.sun.tools.javac.code.TypeTag

programmeradmin4浏览0评论

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
Add a comment  | 

1 Answer 1

Reset to default 1

I 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).

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论