I am in the process of upgrading our existing application from Spring Boot 2.7.8 to 3.0.13. The core Spring Boot library is being pulled in through a custom common library our team uses. I'm using IntelliJ 2022.1.2 Ultimate Edition (for Mac), JDK 17, and Lombok. When compiling my POM, I get multiple errors similar to this:
<file location>:[85,69] error: cannot find symbol
symbol: method getRuleName()
location: class RuleManagerDto
...and this:
<file location>:[9,64] error: cannot find symbol
symbol: class ResultBuilder
location: class Result
The errors start after this line in the compiling process: maven-compiler-plugin:3.8.1:compile (default-compile)...
I'm assuming the issue is related to annotation processing, specifically the @Data
and @Builder
annotations. I've tried the following things to address the issue:
maven-compiler-plugin
element:
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.6.0</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.2.0</version>
</path>
</annotationProcessorPaths>
<annotationProcessorPath>
in place of <path>
above<optional>
property to Lombok dependency<forceJavacCompilerUse>true</forceJavacCompilerUse>
<scope>provided</scope>
to Lombok dependencyNone of these potential remedies have fixed the problem. I am invalidating the cache and restarting after every attempted fix. I am also using the update switch when compiling: mvn clean -U install
. My colleague has suggested that the problem is with a related library that is out of date, which is plausible. However, I'm not getting any errors other than the types listed above, so I have no idea which library it could be.
The annotation processing errors have been eliminated. In the POM, I changed <springdoc.version>1.6.0</springdoc.version>
to <springdoc.version>1.8.0</springdoc.version>
. One of my coworkers found this fix. I'm not sure where he came up with it, so I can't point to a source. I'm receiving many new errors, but at least these ones are fixed. Thanks to everyone who responded.