Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

[BUG] Lombok 1.18.46 fails on JDK 27: ClassNotFoundException com.sun.tools.javac.tree.EndPosTable #4072

Closed
M0hammedAlnajjar/Medhmar
#129

Description

@danishnawab

Describe the bug

Lombok 1.18.46 does not work on JDK 27. LombokProcessor.init() throws ExceptionInInitializerError, caused by a ClassNotFoundException for com.sun.tools.javac.tree.EndPosTable, which was removed in JDK 27:

Since this happens during processor initialization, all compilation fails — including files with no Lombok annotations.

To Reproduce

Example.java:

import lombok.Getter;

public class Example {
    @Getter private String name;
}
javac -proc:full -cp lombok.jar Example.java
An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.ExceptionInInitializerError
	at lombok.javac.apt.LombokProcessor.placePostCompileAndDontMakeForceRoundDummiesHook(LombokProcessor.java:174)
	at lombok.javac.apt.LombokProcessor.init(LombokProcessor.java:96)
	at lombok.core.AnnotationProcessor$JavacDescriptor.want(AnnotationProcessor.java:160)
	at lombok.core.AnnotationProcessor.init(AnnotationProcessor.java:213)
	at lombok.launch.AnnotationProcessorHider$AnnotationProcessor.init(AnnotationProcessor.java:64)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:633)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:757)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:852)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1183)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1304)
	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1265)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.tree.EndPosTable
	at java.base/java.lang.ClassLoader.findClass(ClassLoader.java:685)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:569)
	at lombok.launch.ShadowClassLoader.loadClass(ShadowClassLoader.java:565)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:502)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:479)
	at java.base/java.lang.Class.forName(Class.java:469)
	at lombok.javac.Javac.getMethod(Javac.java:260)
	at lombok.javac.Javac.<clinit>(Javac.java:223)
	... 16 more

No class file is produced.

Expected behavior

Example.java compiles and Example gets a generated getName(), as it does on JDK 26 and earlier.

Version info (please complete the following information):

  • Lombok version: 1.18.46
  • Platform: javac, javac 27 (openjdk version "27" 2026-09-15, build 27+35-2325, openjdk-27_macos-aarch64_bin.tar.gz from download.java.net), macOS aarch64

Additional context

  • JDK 25 and 26 are unaffected; the same file compiles and the getter is generated.
  • Also fails under Gradle 9.7 with a Java 27 toolchain.

Activity

  1. Rawi01 commented on Aug 23, 2026

    @Rawi01
    Collaborator

    Thanks for the report.

    This is caused by this PR and requires multiple changes in lombok.

  2. added
    acceptedThe issue/enhancement is valid, sensible, and explained in sufficient detail
    on Aug 23, 2026
  3. danishnawab commented on Aug 24, 2026

    @danishnawab
    ContributorAuthor

    @Rawi01 I made an attempt to resolve this problem: https://github.com/projectlombok/lombok/pull/4074/changes

    Disclosure: I used AI to help understand the existing code base as well as brainstorm various design choices.

  4. added this to the next-version milestone on Aug 27, 2026
  5. rzwitserloot commented on Aug 27, 2026

    @rzwitserloot
    Collaborator

    Seems like the end pos table thing that @danishnawab fixed was the only holdup; we already updated the ASM dep earlier.

    edge release with the JDK27 update is live. We intend to push that out as lombok v1.18.48 soon (before the release of JDK27 proper on 2026-09-15).

  6. added a commit that references this issue on Aug 27, 2026
    10ab92b
  7. mmoayyed commented on Sep 2, 2026

    @mmoayyed
    Contributor

    Wanted to confirm that JDK 27 builds with the latest Lombok version now pass for my builds. Thank you all for handling this ahead of the actual JDK release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThe issue/enhancement is valid, sensible, and explained in sufficient detailbugjavac

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions