How can i fix 'java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid'' error?
When I research the problem, I encountered Java version and lombok version incompatibility problem. I use java 19 and lombok 1.18.20 version in my spring boot project. How can I fix this problem without using jdk21?
This issue is only related to incompatibility between Project SDK, Spring Boot and Lombok versions. These two pairs of old and new versions work well together. Note to check the "Project Structure" to make sure the correct SDK is set for the project. Check out the screenshot below each sample for more clarity.
You can try to modify lombok's version, update (exactly).
Usually the newest version will be OK. As follows.
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
</dependency>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With