1

I downloaded and installed Lombok project (1.16.16) in eclipse maven project. I also see a new javaagent line added to my eclipse.ini file. I am able to use @Getter and @Setter annotations, however when I try to add @Log4j or @Slf4j annotation it shows red squiggly immediately. I restarted eclipse, cleaned the project but no help. Error message says "org.apache.log4j.Logger cannot be resolved to a type". I don't understand why it is asking me to import Apache jar when I am using lombok.

enter image description here

I also tried changing maven repo assuming if there would be some conflicting libraries which might be causing this, but it doesn't seem to work either.

Am I missing anything? I think all possible solutions I could find online.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Vrushank Doshi
  • 2,428
  • 5
  • 20
  • 34
  • Does this answer your question? [Building with Lombok's @Slf4j and Eclipse: Cannot find symbol log](https://stackoverflow.com/questions/16627751/building-with-lomboks-slf4j-and-eclipse-cannot-find-symbol-log) – AncientSwordRage May 13 '20 at 08:46

1 Answers1

0

The logging library still needs to be a dependency of your project. Add it to your pom.xml.

David Conrad
  • 15,432
  • 2
  • 42
  • 54