1

Building the project using gradle in eclipse after Using @Slf4j annotation of lombok is throwing below error :

Task :compileJava FAILED error: cannot find symbol log.trace("logging now"); ^ symbol: variable log

But it is generating the .class file with the log variable correctly : private static final Logger log = LoggerFactory.getLogger(NetsuiteWebSecurityConfig.class);

There is no problem with the @Data lombok annotation. It is generating getters/setters in .class file and also not throwing any error .

Note : i referred this Cannot make Project Lombok work on Eclipse (Helios) for lombok installation . I can say lombok is working because it is generating the code in .class file . Not sure why it is failing while giving gradle build

hem
  • 195
  • 1
  • 15
  • Did you install the Eclipse plugin? – chrylis -cautiouslyoptimistic- Jan 15 '19 at 17:29
  • I guess there is no lombok eclipse plugin . But i installed lombok by downloading jar and running java -jar lombok.jar , it asked me eclipse directory . After installation i was able to see lombok mentioned in the about section of eclipse . I verified the eclipse.ini as well . Do eclipse have lombok plugin ? – hem Jan 15 '19 at 17:44

1 Answers1

1

I installed lombok correctly and set the annotations processor. But still nothing worked . What i have done is created a new folder at another place and cloned my git repository freshly there. To my surprise it worked . Dont know how , but the trick worked .

hem
  • 195
  • 1
  • 15