1
IDE:IntelliJ IDEA 2020.3.2 (Ultimate Edition)
Play:1.4.4
Lombok:1.18.18
Exception:play.exceptions.CompilationException: The method getId() is undefined for the type Order
        at play.classloading.ApplicationCompiler$2.acceptResult(ApplicationCompiler.java:264)
        at org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:678)
        at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:522)
        at play.classloading.ApplicationCompiler.compile(ApplicationCompiler.java:300)
        at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:420)
        at play.classloading.ApplicationClassloader.getAssignableClasses(ApplicationClassloader.java:466)
        at play.templates.GroovyTemplateCompiler.endTag(GroovyTemplateCompiler.java:362)
        at play.templates.TemplateCompiler.generate(TemplateCompiler.java:93)
        at play.templates.TemplateCompiler.compile(TemplateCompiler.java:15)
        at play.templates.GroovyTemplateCompiler.compile(GroovyTemplateCompiler.java:39)
        at play.templates.TemplateCompiler.compile(TemplateCompiler.java:28)
        at play.templates.TemplateLoader.load(TemplateLoader.java:85)
        at play.templates.TemplateLoader.load(TemplateLoader.java:180)
        at play.server.PlayHandler.serve500(PlayHandler.java:836)
        at Invocation.HTTP Request(Play!)

I already checked the settings here, but that didn't fix the problem: Java Compiler Setting Annotation Processors Setting Intellij Plugins

Tom
  • 16,842
  • 17
  • 45
  • 54
adamCH
  • 11
  • 1
  • Please provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) project. – Andrey Feb 18 '21 at 10:06
  • Does this answer your question? [Lombok added but getters and setters not recognized in Intellij IDEA](https://stackoverflow.com/questions/17729384/lombok-added-but-getters-and-setters-not-recognized-in-intellij-idea) – Sathiamoorthy Feb 24 '21 at 16:14
  • Did you actually add Lombok to the (compile time) classpath of your application? – Mark Rotteveel Feb 27 '21 at 09:15

2 Answers2

1

I managed to make it work on a gradle project (Intellij 2020.3.2) by using exactly this in build.gradle :

annotationProcessor 'org.projectlombok:lombok'

I think important point is to declare it as "annotationProcessor" type and not "compile" or so.

R. Du
  • 544
  • 4
  • 16
0

if someone gets the same issues, I found the answer

just keep the IntelliJ setting all the right

then I trying to change the Lombok version

Playframework - 1.4.4
Lombok - 1.18.2
IntelliJ - 2020.3
IntelliJ Plugins - Lombok 0.32-EAP

that's work ...

adamCH
  • 11
  • 1