jdtls fails to recognize Lombok annotations (log cannot be resolved, builder undefined) #5388

Closed
opened 2026-02-16 17:52:07 -05:00 by yindo · 0 comments
Owner

Originally created by @CoderXiaohui on GitHub (Jan 13, 2026).

Originally assigned to: @rekram1-node on GitHub.

Question

Issue Description

I am developing a Java project using the Spring Framework and Lombok. I am using jdtls as my Language Server (installed via OpenCode), but it seems that jdtls is not correctly processing Lombok annotations.

While the project compiles and runs perfectly fine using Maven, the IDE/Editor highlights several false-positive errors.

Error Logs / Screenshots

The following errors are reported by jdtls:

  • log cannot be resolved (Related to @Slf4j)
  • The blank final field may not have been initialized (Related to @RequiredArgsConstructor / @AllArgsConstructor)
  • builder() is undefined (Related to @Builder)

Diagnostics from OpenCode:

These errors occur because jdtls (Java Development Tools Language Server) does not correctly identify Lombok annotations during static analysis, even though the Maven build processes them correctly via the annotation processor.

Current Status / Steps Taken

I attempted to troubleshoot the issue by uninstalling the jdtls version by OpenCode (via brew uninstall jdtls).

After the uninstallation, OpenCode confirms that jdtls is no longer installed. I am now looking for the best practice to reinstall it and ensure that it is properly configured to support Lombok from the start, rather than just a default installation that fails to recognize annotations.

Environment

  • Framework: Spring Boot
  • Build Tool: Maven
  • LSP: jdtls
  • Lombok Version: [1.18.30]
Originally created by @CoderXiaohui on GitHub (Jan 13, 2026). Originally assigned to: @rekram1-node on GitHub. ### Question ### Issue Description I am developing a Java project using the **Spring Framework** and **Lombok**. I am using `jdtls` as my Language Server (installed via OpenCode), but it seems that `jdtls` is not correctly processing Lombok annotations. While the project compiles and runs perfectly fine using **Maven**, the IDE/Editor highlights several false-positive errors. ### Error Logs / Screenshots The following errors are reported by `jdtls`: - `log cannot be resolved` (Related to `@Slf4j`) - `The blank final field may not have been initialized` (Related to `@RequiredArgsConstructor` / `@AllArgsConstructor`) - `builder() is undefined` (Related to `@Builder`) **Diagnostics from OpenCode:** > These errors occur because `jdtls` (Java Development Tools Language Server) does not correctly identify Lombok annotations during static analysis, even though the Maven build processes them correctly via the annotation processor. ### Current Status / Steps Taken I attempted to troubleshoot the issue by uninstalling the `jdtls` version by OpenCode (via `brew uninstall jdtls`). After the uninstallation, OpenCode confirms that `jdtls` is no longer installed. I am now looking for the best practice to reinstall it and ensure that it is properly configured to support Lombok from the start, rather than just a default installation that fails to recognize annotations. ### Environment - **Framework:** Spring Boot - **Build Tool:** Maven - **LSP:** jdtls - **Lombok Version:** [1.18.30]
yindo closed this issue 2026-02-16 17:52:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5388