Fixing error "Lombok annotation handler class lombok.eclipse.handlers.HandleBuilder failed"
Asked Answered
I

4

12

In my Windowns 11 environment I use Visual Studio Code (1.87.2) to develop Java applications. In one of these apps we use some of the Project Lombok's annotations (1.18.24) such as @Builder, @Data, @EqualsAndHashCode and so on.

After opening the project using Eclipse For Java Developers (2024-03 R) and going back to VSCode every class that uses the annotations showed errors on VSCode and the project doesn't compile anymore. Apparently the error that traces back to the rest is the one in the title as I found another user with the same problems in this issue: https://github.com/redhat-developer/vscode-java/issues/3561.

The error persisted even after I tried updating to the latest Lombok release (1.18.32), removing the Eclipse installation, using a previous version, deleting all info from my SO user and reconfiguring the environment (JDK + Maven).

I need help to understand the problem to see if it's fixable and how should I go on if possible or if the case is a matter of waiting until a fix is added.

Inoue answered 4/4 at 14:38 Comment(5)
Hi welcome to the community I faced exactly this same thing today just like you... seams like I choose the wrong day to update my eclipse installation. I was able to fix it by installing the latest lombok (1.18.32) on my eclipse install, run a mvn clean install of my project and then a full clean of my workspace on eclipse, I am not sure if that is an answer since all of that is something I had already done :) hope it helpsClowers
Do you have the Lombok Annotations Support for VS Code extension installed?Phanotron
@Phanotron I forgot to mention I tried installing it, but that also didn't fix my problem.Inoue
@Clowers thank you! I actually tried this as well and it worked fine on Eclipse, but not on VS Code.Inoue
Please don't add "solved" to your title or question. Instead, mark an answer correct by clicking on the checkmark. You can also add your own answer and accept it if none of the ones you received solved your problem.Deaminate
S
12

Like it was already mentioned the fix was to go back to Language Support for Java(TM) by Red Hat Extension version 1.28.1:

code --install-extension [email protected]

After that, run in VS Code:

Java: Force Java Compilation

Full

Shipworm answered 8/4 at 6:18 Comment(1)
Clicking on the down harrow of the "uninstall" button on VSC Extension there's a menu and any old versions could be choosen.Beetlebrowed
C
3

For Eclipse:

I was able to fix it by installing the latest lombok (1.18.32) on my eclipse install, run a mvn clean install of my project and then a full clean of my workspace on Eclipse.

Clowers answered 16/4 at 21:22 Comment(0)
E
1

In my case, in order to fix the problem in Spring Tools Suite 4.22.1.RELEASE (Latest version at this date), I've just downloaded the Lombok last version, 1.18.32, from the Lombok download page, and executed the downloaded .jar file:

java -jar lombok.jar

After that, I started STS as usual, and the problem got fixed.

Expiry answered 9/5 at 19:59 Comment(0)
T
0

For Eclipse

Using the lombok edge release v1.18.33 solved the Problem for me.

lombok-edge v1.18.33

Thalia answered 19/6 at 15:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.