Lombok-intellij-plugin: Lombok failed on IDE IntelliJ 2020.3

Created on 2 Dec 2020  路  25Comments  路  Source: mplushnikov/lombok-intellij-plugin

java: You aren't using a compiler supported by lombok, so lombok will not work and has been disabled.
Your processor is: com.sun.proxy.$Proxy27
Lombok supports: sun/apple javac 1.6, ECJ

duplicate

Most helpful comment

Yes, all previous version of lombok library before 1.18.16 contains a Bug and new IntelliJ cann't use it by default.
Just update to the 1.18.16 version of lombok.

You can also use a workaround for previos versions:

Go to File | Settings | Build, Execution, Deployment | Compiler | Build process VM options field and add
-Djps.track.ap.dependencies=false

For more details see rzwitserloot/lombok#2592 and https://youtrack.jetbrains.com/issue/IDEA-250718#focus=Comments-27-4418347.0-0

duplicate #950, #952, #955

All 25 comments

java: You aren't using a compiler supported by lombok, so lombok will not work and has been disabled.
Your processor is: com.sun.proxy.$Proxy28
Lombok supports: OpenJDK javac, ECJ

My project was lombok version 1.18.12 changed to lombok version 1.18.16 and working now.

My project was lombok version 1.18.12 changed to lombok version 1.18.16 and working now.

Same here, moving from v1.18.12 to v1.18.16 fixed the issue.

After installing IntelliJ IDEA 2020.3 I get the following error and IDEA crashes:

2020-12-02 16:22:47,025 [   2240]  ERROR - llij.ide.plugins.PluginManager - org.picocontainer.PicoRegistrationException: Key de.plushnikov.intellij.plugin.processor.handler.BuilderHandler duplicated 
java.util.concurrent.CompletionException: org.picocontainer.PicoRegistrationException: Key de.plushnikov.intellij.plugin.processor.handler.BuilderHandler duplicated
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
    at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:683)
    at java.base/java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:658)
    at java.base/java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:2094)
    at com.intellij.idea.ApplicationLoader.registerAppComponents(ApplicationLoader.kt:106)
    at com.intellij.idea.ApplicationLoader.executeInitAppInEdt(ApplicationLoader.kt:65)
    at com.intellij.idea.ApplicationLoader.access$executeInitAppInEdt(ApplicationLoader.kt:1)
    at com.intellij.idea.ApplicationLoader$initApplication$1$1.run(ApplicationLoader.kt:374)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: org.picocontainer.PicoRegistrationException: Key de.plushnikov.intellij.plugin.processor.handler.BuilderHandler duplicated
    at com.intellij.util.pico.DefaultPicoContainer.registerComponent(DefaultPicoContainer.java:119)
    at com.intellij.serviceContainer.ComponentManagerImpl.registerServices(ComponentManagerImpl.kt:364)
    at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:214)
    at com.intellij.idea.ApplicationLoader$registerAppComponents$1.apply(ApplicationLoader.kt:108)
    at com.intellij.idea.ApplicationLoader$registerAppComponents$1.apply(ApplicationLoader.kt)
    at java.base/java.util.concurrent.CompletableFuture.uniApplyNow(CompletableFuture.java:680)
    ... 19 more 

IntelliJ IDEA 2020.3 Build #IU-203.5981.155
JDK: 11.0.9; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
OS: Mac OS X

How can I change the version to 1.18.16?

Yes, all previous version of lombok library before 1.18.16 contains a Bug and new IntelliJ cann't use it by default.
Just update to the 1.18.16 version of lombok.

You can also use a workaround for previos versions:

Go to File | Settings | Build, Execution, Deployment | Compiler | Build process VM options field and add
-Djps.track.ap.dependencies=false

For more details see rzwitserloot/lombok#2592 and https://youtrack.jetbrains.com/issue/IDEA-250718#focus=Comments-27-4418347.0-0

duplicate #950, #952, #955

The problem is that, IntelliJ IDEA won't even open to add -Djps.track.ap.dependencies=false to VM options field.
As soon as it starts loading it just throws a lot of exceptions, one of which is the one I've posted.

@uorhsohk You have some other problem, maybe you got lombok plugin installed twice. Please try to remove your installation, drop all caches and setting and install it completely fresh.

Hmm... alright, will do, thanks a lot.

For me, changing my old lombok dependency to this version fixed the issue:

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.16</version>
    <scope>provided</scope>
</dependency>

IntelliJ:

IntelliJ IDEA 2020.3 (Community Edition)
Build #IC-203.5981.155, built on December 1, 2020
Runtime version: 11.0.9+11-b1145.21 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-56-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 1954M
Cores: 4
Registry: ide.balloon.shadow.size=0
Non-Bundled Plugins: io.github.qeesung.component.HighlightBracketPair, monokai-pro, Docker, Lombook Plugin, com.godwin.json.parser, org.sonarlint.idea, org.intellij.scala, com.chrisrm.idea.MaterialThemeUI
Current Desktop: KDE

Hi, I got the same problem, but we cannot upgrade lombok. So is there any other solutions here?

Hi, I got the same problem, but we cannot upgrade lombok. So is there any other solutions here?

Maybe downgrading intelliJ will help.. For me this is happening since last upgrade(or just the plugin).

java: You aren't using a compiler supported by lombok, so lombok will not work and has been disabled.
Your processor is: com.sun.proxy.$Proxy28
Lombok supports: OpenJDK javac, ECJ

yes!!! I update my project's pom.xml ,change the lombok version to 1.18.16,then it works!!!

Hi, I got the same problem, but we cannot upgrade lombok. So is there any other solutions here?

Did you try the solution already provided by @mplushnikov in his earlier comment ?
Refer: https://github.com/mplushnikov/lombok-intellij-plugin/issues/988#issuecomment-737328145

Getting same problem on JDK 11:

java: You aren't using a compiler supported by lombok, so lombok will not work and has been disabled.
  Your processor is: com.sun.proxy.$Proxy28
  Lombok supports: OpenJDK javac, ECJ

JDK version:

java -version
openjdk version "11.0.7" 2020-04-14 LTS
OpenJDK Runtime Environment Zulu11.39+15-CA (build 11.0.7+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.39+15-CA (build 11.0.7+10-LTS, mixed mode)

The separate Lombok plugin of IntelliJ IDEA 2020.2 worked with this JDK without issues.
When mvn package compiles it on the CLI, IntelliJ should do it as well, or it is a bug...

For Mapstruct and Lombok users
After upgrading lombok version to 1.18.16, you may also have to upgrade Mapstruct to latest version. In my case, I was using Mapstruct 1.3.1.Final and changed to 1.4.1.Final.
Plus, you will have to add lombok-mapstruct-binding to your list of annotationProcessorPaths.
This would look like:

<annotationProcessorPaths>
    <path>
        <groupId>org.mapstruct</groupId>
        <artifactId>mapstruct-processor</artifactId>
        <version>1.4.1.Final</version>
    </path>
    <path>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.16</version>
    </path>
    <path>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok-mapstruct-binding</artifactId>
        <version>0.2.0</version>
    </path>
</annotationProcessorPaths>

IMO updating the project pom is the wrong path to resolve issues in the IDE. In our organization this would mean updating hundreds of projects.

We don't rebuild the house because the couch doesn't fit.

Hi, I got the same problem, but we cannot upgrade lombok. So is there any other solutions here?

Maybe downgrading intelliJ will help.. For me this is happening since last upgrade(or just the plugin).

Can you help me. How to downgrade IntelliJ?

There is no real downgrade function.
Just uninstall the current version and make sure to keep your current settings.
Then download the 2020.2 from https://www.jetbrains.com/idea/download/other.html and install it.

java: You aren't using a compiler supported by lombok, so lombok will not work and has been disabled.
Your processor is: com.sun.proxy.$Proxy27
Lombok supports: sun/apple javac 1.6, ECJ

Just need to update lombok to a higher version. Fixed the issue for me by moving from 1.18.12 to 1.18.16

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <scope>compile</scope>
    <version>1.18.16</version>
</dependency>

My project was lombok version 1.18.12 changed to lombok version 1.18.16 and working now.

Thank you. I tried to change 1.16.12 to 1.18.16 and solved my problem.

compiler message file broken: key=compiler.misc.msg.bug arguments=11.0.9, {1}, {2}, {3}, {4}, {5}, {6}, {7}
java.lang.ClassCastException: class com.sun.tools.javac.tree.JCTree$JCMethodInvocation cannot be cast to class com.sun.tools.javac.tree.JCTree$JCNewClass (com.sun.tools.javac.tree.JCTree$JCMethodInvocation and com.sun.tools.javac.tree.JCTree$JCNewClass are in module jdk.compiler of loader 'app')
at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr$ResolvedConstructorType.dup(ArgumentAttr.java:639)
at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.processArg(ArgumentAttr.java:240)
at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.processArg(ArgumentAttr.java:219)
at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.visitApply(ArgumentAttr.java:308)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1634)
at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.attribArg(ArgumentAttr.java:197)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:653)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribArgs(Attr.java:751)
at jdk.compiler/com.sun.tools.javac.comp.Attr.visitNewClass(Attr.java:2192)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1689)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
at jdk.compiler/com.sun.tools.javac.comp.Attr.visitReturn(Attr.java:1866)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1546)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:724)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStats(Attr.java:743)
at jdk.compiler/com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1294)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1020)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:724)
at jdk.compiler/com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1098)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:866)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:724)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4683)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4574)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4503)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attrib(Attr.java:4448)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1341)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:147)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:174)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1134)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:187)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)

I've used version1.18.16 , but it still don't work.

With _Lombok_ 1.18.4 I was having the same issue:

java: You aren't using a compiler supported by lombok, so lombok will not work and has been disabled.
  Your processor is: com.sun.proxy.$Proxy20
  Lombok supports: sun/apple javac 1.6, ECJ

The error occurred only when building via the IDE: compiling with mvn compile via command line was working fine.

I have tried with no success:

  • upgrading Lombok version to 1.18.16 in the pom.xml
  • making sure _annotation processing_ is enabled under File > Settings > Build, Execution, Deployment > Compiler > Annotation Processors
  • making sure only the bundled _Lombok_ plugin (version 203.7148.57) is installed and enabled
  • cleaning the project
  • invalidating the cache and restarting
  • deleting ~/.m2/repository/

The only thing which worked was adding -Djps.track.ap.dependencies=false to the _Shared build process VM options_.

Using _IntelliJ IDEA 2020.3.2 (Ultimate Edition)_.

$ java -version
openjdk version "1.8.0_265"
OpenJDK Runtime Environment (build 1.8.0_265-b01)
OpenJDK 64-Bit Server VM (build 25.265-b01, mixed mode)

Strangely, updating lombok to 1.18.16(or even 1.18.18) doesn't solve the problem for me. Using -Djps.track.ap.dependencies=false works. I'm using java 11 and IntellijIDEA Ultimate 2020.3

1, upgrade lombok to 1.18.16
2, close idea
3, delete folder ".idea", folder "target", file "*.iml"
4, open project in idea again
it work now

If you don't know which project you had open, you can just delete lombok plugin in directory like C:\Users\<USER>\AppData\Roaming\JetBrains\IntelliJIdea2020.3\plugins\*lombok*. You can check directory based on your OS here https://intellij-support.jetbrains.com/hc/en-us/articles/206544519

Was this page helpful?
0 / 5 - 0 ratings