Issue with Lombok, symbol not found in multimodule java17 project. :lombok version 1.18.26

3,772 views
Skip to first unread message

Sampada Aggarwal

unread,
Sep 14, 2023, 9:04:06 AM9/14/23
to Project Lombok
Hi,

I have a multi module project. Everything is working fine with Java8. However, when I try to upgrade it to Java17, I get the following errors in compilation

 error: cannot find symbol

[ERROR]   symbol:   class Builder

symbol:   method getValue()

[ERROR]   location: variable kvp of type val

Tried couple of things but nothing helped.

  1. lombok.addLombokGeneratedAnnotation = true in lombok.config-file 
  2. maven-compiler-plugin 3.5
  3. Tried <annotationProcessorPaths>

Kindly suggest

Regards,
Sampada

Mat Jaggard

unread,
Sep 14, 2023, 6:07:25 PM9/14/23
to project-lombok
Hi Sampada,
In my experience the most common cause of these kinds of errors is that Java didn't get as far as running annotation processing, and therefore Lombok, due to some other error. Is it possible that you have some code that is fine compiling under Java 8 but not Java 17?

In the past I've had this problem when I've made mistakes such as using `implements` with an abstract class. Since we make use of Lombok everywhere, that means we can end up seeing thousands of errors, hiding the real cause. Could something similar be happening for you?

Lastly, if the above doesn't help, are you able to produce a smaller example of the failure?

Mat.

--
You received this message because you are subscribed to the Google Groups "Project Lombok" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-lombo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/project-lombok/f2cbd858-c066-4ad5-948d-11c86a14ed6dn%40googlegroups.com.

Dave

unread,
Sep 16, 2023, 5:20:39 PM9/16/23
to project...@googlegroups.com
well for `val` you can do a project search replace and use `var` -- do you get this with any other lombok?

Sampada Aggarwal

unread,
Sep 26, 2023, 1:46:54 AM9/26/23
to project...@googlegroups.com
yes thanks Mat. Like you mentioned, there was 1 error not related to Lombok out of 100s of Lombok errors. When we fixed that error, the lombok errors automatically got resolved.

Regards,
Sampada

You received this message because you are subscribed to a topic in the Google Groups "Project Lombok" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/project-lombok/vPn5hZOA_Dc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to project-lombo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/project-lombok/CAD0R3sDnmXym4tMPkx9EQ8kOJnbmGoyGia6qm0i6ynVNyKRzhQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages