New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lombok/Mapstruct problem: Cannot find symbol #1270
Comments
By downgrading the maven-compiler-plugin from 3.6.1 to 3.1 I got it to work.
I will leave the issue open in case this is a bug - it is possible that I have missed this requirement in some documentation. |
Thanks for the nice words. We are glad that you like MapStruct 😄 . The problem is that you have only The
You can also have a look at the mapstruct-lombok example from our repository. I am going to close this issue as it is a problem in the configuration 😄 |
I had the same problem here. The mapping bean wasnt being implemented with the corresponding attributes, after a long time, I've discovered that the processorsPath order was interfering in the lombok getters/setters implementation and the mappings made by mapstruct. The way I've solved was reordering the processors, here is a example of my pom:
|
@lucashos just curious to know which versions of Lombok and MapStruct are you using? Because if you are using the ones that should be compatible, the order should not matter. |
@filiphr Intresting... The solution worked for a whole day, but at the other day it just doesnt worked anymore. |
@lucashos this is really strange. I really have no idea why it is doing this |
I got "cannot find symbol" error when there is a syntax error in my "expression" code, maybe this will be useful. |
First of all, I'm glad to see that you tried to use that. So, I had this problem too and my solution was that:
I recommend you build the project without IDE using mvn install on prompt. If the problem persist, just try to re-install lombok jar into your IDE (if you are using eclipse), and restart... |
@lucashos Thanks man, I solved with your suggestion. |
Hi guys i have the same problem, I try to use all solutions in comments without result, the main difference with other post is that im using java 11, this is my config:
|
Hi, I love MapStruct and Lombok, but I get a "cannot find symbol" error when compiling with Maven from command-line using Javac.
In some setups, it is the @Mapper annotation that cannot be found, in other setups it is the calls to the Lombok-generated getters/setters etc.
I have created a minimal test-project that demonstrates the error. Code, pom file, stacktrace, Java-version, Maven-version, dependencies etc are all described in the zip-folder files.
I am using
maven-compiler-plugin
version 3.6.1,mapstruct-jdk8
version 1.2.0.CR1 andlombok
version 1.16.16. And the project is a spring-boot application.Note that this issue resembles #841, which recommends to exlude the transitive mapstruct dependency pulled in from the dependency to springfox-swagger2. This, however, did not solve the problem.
This is the output from
mvn clean verify
:Lombok-Mapstruct-SpringBoot-Problem.zip
The text was updated successfully, but these errors were encountered: