When using Lombok and annotate classes with Getter, Setter, Data,...-annotations the code gets compiled with no errors and also the jar ist starting normally. But when using it and try to call some webservice functions it behaves weird. Sometimes the objects are returned correctly, sometimes it crashes with MethodNotFound-Exceptions, sometimes fields are just missing. Especially when you change some code and the hot-reload recompiles the jar at most times it's not working anymore.
When generating all getters and setters everything works all the time.
Is this intentionally or how can i properly integrate Lombok to my quarkus projects?
Hi, I ported an existing project with about 300 classes annotated with Lombok without any problem.
The only things I had to change was the scope of the Lombok dependency, from provided to compile to let the runtime hot recompile the changed source code.
Thank you for the hint on the compile scope. After setting this and updating to openjdk11 it's working for me now.
I'm still in Java 8 (want to use GraalVM) and setting Lombok's scope to compile does not make it work. Is there a workaround?
I have the same issue, compile has problems. When I add lombok's @AllArgsContructor
, project will fail to compile, using
same here.
I found a strange workaround ... maybe it helps others too.
I made the lombok annotations full qualified and then it worked ?!
@lombok.Data
@lombok.ToString
Most helpful comment
Hi, I ported an existing project with about 300 classes annotated with Lombok without any problem.
The only things I had to change was the scope of the Lombok dependency, from provided to compile to let the runtime hot recompile the changed source code.