_Basically. I started up IntelliJ to continue coding on a project and when I compiled it, it just spat out over a hundred errors just being "
Error:(35, 13) java: cannot find symbol
symbol: method writeInt(int)
location: variable boos of type lombok.val"_
This has happened before in other projects and the only solution was to copy all my files to a new project with Lombok and hope that the problem does not occur again or remove all Lombok types/annotations / etc. After it happened again today, I wanted to search for a solution. Everything online just suggested "Enable Annotation Processor" or "Install the Lombok Plugin" or other tips which did not help.
I already tried
Enable Annotation Processor
(Re-)Installed the Plugin
Updated Lombok
Updated Maven
Downgraded Maven
Included Lombok in my pom.xml
Added lombok.jar to my project libraries instead of a global library
Invalidated Caches
I've basically tried everything I could find online but nothing worked.
_To does not throw the error while compiling_
_None, it just happened randomly_
I am getting the same issue, any help please?!
Hmh, please check Plugin-Settings, some features can be disabled there...
If it doesn't help, please try to provide some example project (full directory with idea files and settings)
Closed, as no feedback provided
For anybody looking here through Google: IntelliJ used some cache to run the compilation fine for a limited time and then broke for me.
What caused the issue was:
<compilerArguments>
<processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
</compilerArguments>
in the configuration of maven-compiler-plugin in pom.xml. Removing it allowed Lombok to compile again.
@Acrobot Thanks for the hint. In my case the mapstruct-processor plugin cause the problem. When i remove the plugin lombok start working again
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version> <!-- or newer version -->
<configuration>
<source>1.8</source> <!-- depending on your project -->
<target>1.8</target> <!-- depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
<!-- other annotation processors -->
</annotationProcessorPaths>
</configuration>
</plugin>
For any astray human being, I had that very same problem, and the solution was removing the @Getter annotation from one of the fields I had. For some reason, the presence of this very annotation broke everything.
Java 14, Intellij Idea, @Value annotation on the static inner class broke lombok completely,
lombok recovered after I removed this annotation.
For me it was @UtilityClass annotation that crashed everything. Delomboking helped.
I had the same issue today. I was very surprised when I got this problem. The root of evil was in @UtilityClass annotation. When I removed it everything worked fine.
Same issue, when I run maven clean install, everything works, but not when I try to run the application from IntelliJ. Lombok completely stopped working after updating my IntelliJ version from 2019 to 2020. The error is related to @Getter and @Builder, but I suspect that the root of the problem has something to do with MapStruct (@ahmeed83 )
I solved the issue deleting the .idea folder and the *.iml file. I don't understand the reason behind it, but I hope that this helps other people.
In my case it was a simple compile error with no connection to lombok, but somehow it caused this problem. After fixing the compile error, all the errors which seemd to be coming from lombok disappeared.
Most helpful comment
For me it was @UtilityClass annotation that crashed everything. Delomboking helped.