Lombok : constructor is undefined

Viewed 3606

I am using lombok in a spring project and building with gradle. All of the things were woking fine before. suddenly some errors have started coming.

Error is "Constructor(Constructor name) is undefined".

Have given all the DTO @Data,@NoArgsConstructor,@AllArgsConstructor, so ideally all the constructor should be available.

I have tried to build the project with old and new versions of Spring tool suite and changed lombok jar as well. but still same or different errors are coming.

Tried with STS4 and STS 3.9.7, 3.9.8 same issue is coming. Tried lombok 1.16.22, 1.18.0,1.18.2,1.18.8.

Please help me to resolve this issue.

1 Answers

Might be issue with Lombok setup.

Did you follow below listed steps.

  1. Copy the lombok.jar to your STS installation path.
  2. Run the command and update your STS path.
java -jar /path/to/your/lombok.jar
  1. Update the STS.ini (aka SpringToolSuite4.ini) with
-javaagent:lombok.jar
  1. Restart STS/Eclipse.

Steps To Setup Lombok

Related