Spurious red errors and broken import autocompletion

已回答

I have a  lot of spurious red "errors" in IntelliJ that refuse to go away.

Everything works from the command line and in Jenkins, so I know there's nothing actually wrong. I can even run tests in  IntelliJ.

But, it fails to automatically add imports due to the red (which says for example, that it can't find Spring annotations).

I've tried:

  • Cearing caches and restarting.
  • Shutting down, deleting .idea and .gradle caches/daemon/workers, and restarting.
  • Restarting the Mac.
  • Reinstalling IntelliJ.

Nothing works.

It's acting like annotation processing is disabled, but it's enabled, and the lombok plugin is installed and enabled.

There's nothing useful about this in stackoverflow or from googling around online. I'm on the latest versions of IJ and Gradle. Does anyone have suggestions?

0

Build -> Rebuild Project also doesn't help.

0

Java version is 1.8.0_202.

0

Also tried deleting the project and git cloning it fresh. Didn't help.

0

Any exceptions in the logs? https://intellij-support.jetbrains.com/hc/articles/207241085

Do you see lombok jars present in the module dependencies: https://www.jetbrains.com/help/idea/working-with-module-dependencies.html#add-a-new-dependency ?

Is it possible to share the logs and the sample project to reproduce this issue? https://uploads.services.jetbrains.com/ .

0

After another scorched-earth, it finally cleared the red.

0

Lombok was in the dependencies (and still is):

./gradlew dependencies | grep lombok
\--- org.projectlombok:lombok:1.18.12
+--- org.projectlombok:lombok:1.18.12
| | +--- org.projectlombok:lombok:1.18.12 (c)
+--- org.projectlombok:lombok:1.18.12 (n)
+--- org.projectlombok:lombok:1.18.12 FAILED
+--- org.projectlombok:lombok:1.18.12 FAILED
+--- org.projectlombok:lombok:1.18.12
| | +--- org.projectlombok:lombok:1.18.12
| | +--- org.projectlombok:lombok:1.18.12
| | | | +--- org.projectlombok:lombok:1.18.12 (c)
| | +--- org.projectlombok:lombok:1.18.12
| | | +--- org.projectlombok:lombok:1.18.12
| | +--- org.projectlombok:lombok:1.18.12
\--- org.projectlombok:lombok:1.18.12
+--- org.projectlombok:lombok:1.18.12
| | +--- org.projectlombok:lombok:1.18.12 (c)
+--- org.projectlombok:lombok:1.18.12 (n)
+--- org.projectlombok:lombok:1.18.12
| | +--- org.projectlombok:lombok:1.18.12
| | +--- org.projectlombok:lombok:1.18.12
| | | | +--- org.projectlombok:lombok:1.18.12 (c)
| | +--- org.projectlombok:lombok:1.18.12
| | | +--- org.projectlombok:lombok:1.

0

IntelliJ IDEA may not see/have the same dependencies as you get in the command line Gradle for many reasons, that's why I asked to check it in the IDE module dependencies dialog and not in the console.

0

I see exceptions in the logs.

2020-07-02 09:53:47,934 [52722091] INFO - bugger.jdi.StackFrameProxyImpl - Exception while getting this object
com.sun.jdi.InternalException: Unexpected JDWP Error: 35
at com.jetbrains.jdi.JDWPException.toJDIException(JDWPException.java:90)
at com.jetbrains.jdi.StackFrameImpl.thisObject(StackFrameImpl.java:169)
at com.intellij.debugger.jdi.StackFrameProxyImpl.thisObject(StackFrameProxyImpl.java:220)
at com.intellij.reactivestreams.reactor.debugger.ReactorPositionManagerFactory$ReactorPositionManager.getOperatorOnAssemblyInformation(ReactorPositionManagerFactory.java:376)
at com.intellij.reactivestreams.reactor.debugger.ReactorPositionManagerFactory$ReactorPositionManager.createStackFrame(ReactorPositionManagerFactory.java:134)
at com.intellij.debugger.engine.PositionManagerEx.createStackFrame(PositionManagerEx.java:19)
at com.intellij.debugger.engine.CompoundPositionManager.createStackFrame(CompoundPositionManager.java:176)
at com.intellij.debugger.engine.JavaExecutionStack.createStackFrame(JavaExecutionStack.java:97)
at com.intellij.debugger.engine.JavaExecutionStack.initTopFrame(JavaExecutionStack.java:75)
at com.intellij.debugger.engine.SuspendContextImpl.initExecutionStacks(SuspendContextImpl.java:249)
at com.intellij.debugger.engine.JavaDebugProcess$2$1.contextAction(JavaDebugProcess.java:120)
at com.intellij.debugger.engine.events.SuspendContextCommandImpl.action(SuspendContextCommandImpl.java:57)
at com.intellij.debugger.engine.events.DebuggerCommandImpl.run(DebuggerCommandImpl.java:43)
at com.intellij.debugger.engine.DebuggerManagerThreadImpl.processEvent(DebuggerManagerThreadImpl.java:151)
at com.intellij.debugger.engine.DebuggerManagerThreadImpl.processEvent(DebuggerManagerThreadImpl.java:29)
at com.intellij.debugger.impl.InvokeThread.lambda$run$0(InvokeThread.java:138)
at com.intellij.openapi.project.DumbService.runWithAlternativeResolveEnabled(DumbService.java:376)
at com.intellij.debugger.impl.InvokeThread.run(InvokeThread.java:125)
at com.intellij.debugger.impl.InvokeThread.access$100(InvokeThread.java:19)
at com.intellij.debugger.impl.InvokeThread$WorkerThreadRequest.lambda$run$0(InvokeThread.java:49)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:210)
at com.intellij.debugger.impl.InvokeThread$WorkerThreadRequest.run(InvokeThread.java:48)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:255)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

0

Debugger specific exceptions are unlikely to be related.

0

Dependencies doesn't show lombok in the IDE even in the project that no longer shows any red.

0

Sample project to reproduce + complete logs would be needed to investigate it further: https://uploads.services.jetbrains.com/ .

0

Same problem for me, the annotation-processing does not seem to take place, The lombok jar is visible in the IDE module dependencies (for both modules of a two module project). A mvn build works fine, but an IntelliJ build or run/debug fails, with lots of red-errors, all showing that lombok was not activated. Things like this make it really hard to continue to use IntelliJ, I need to have it solved!!!

0

Wouter Sieburgh, could you please provide us with your IDE logs? It's needed to see if there are any related errors. You can share it via JetBrains Uploads service and post the ID you receive here.

0

请先登录再写评论。