Vscode-java: Code completion broken with IntelliCode

Created on 23 Dec 2019  路  22Comments  路  Source: redhat-developer/vscode-java

Looks like latest release 0.55.0 broke server side snippets / code completions

Environment

Version: 1.41.1
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T15:04:31.999Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 4.15.0-70-generic
redhat.java: 0.55.0

Steps To Reproduce

Create empty MyClass.java file and type class to get basic package/class snippet to. This error is then logged in Language Support for Java output:

[Error - 10:53:29] 23-Dec-2019 10:53:29 Problems occurred when invoking code from plug-in: "org.eclipse.jdt.ls.core".
org.eclipse.jdt.ls.core.internal.contentassist.CompletionProposalRequestor.<init>(Lorg/eclipse/jdt/core/ICompilationUnit;I)V
java.lang.NoSuchMethodError: org.eclipse.jdt.ls.core.internal.contentassist.CompletionProposalRequestor.<init>(Lorg/eclipse/jdt/core/ICompilationUnit;I)V
    at com.microsoft.jdtls.intellicode.core.CompletionProvider.initializeRequestor(CompletionProvider.java:133)
    at com.microsoft.jdtls.intellicode.core.CompletionProvider.computeContentAssist(CompletionProvider.java:89)
    at com.microsoft.jdtls.intellicode.core.CompletionProvider.provideCompletionItems(CompletionProvider.java:60)
    at com.microsoft.jdtls.intellicode.core.CommandHandler.executeCommand(CommandHandler.java:57)
    at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:215)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
    at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:205)
    at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$3(JDTLanguageServer.java:472)
    at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$48(JDTLanguageServer.java:963)
    at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
    at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
    at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

[Error - 10:53:29] 23-Dec-2019 10:53:29 Error in calling delegate command handler
org.eclipse.jdt.ls.core.internal.contentassist.CompletionProposalRequestor.<init>(Lorg/eclipse/jdt/core/ICompilationUnit;I)V
java.lang.NoSuchMethodError: org.eclipse.jdt.ls.core.internal.contentassist.CompletionProposalRequestor.<init>(Lorg/eclipse/jdt/core/ICompilationUnit;I)V
    at com.microsoft.jdtls.intellicode.core.CompletionProvider.initializeRequestor(CompletionProvider.java:133)
    at com.microsoft.jdtls.intellicode.core.CompletionProvider.computeContentAssist(CompletionProvider.java:89)
    at com.microsoft.jdtls.intellicode.core.CompletionProvider.provideCompletionItems(CompletionProvider.java:60)
    at com.microsoft.jdtls.intellicode.core.CommandHandler.executeCommand(CommandHandler.java:57)
    at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:215)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
    at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler.executeCommand(WorkspaceExecuteCommandHandler.java:205)
    at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$3(JDTLanguageServer.java:472)
    at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$48(JDTLanguageServer.java:963)
    at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
    at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
    at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

Now I just wonder if this issue is coming from other plugin which hooks to jdt as I'm not that familiar with how that part works.

bug

Most helpful comment

All 22 comments

yes,I have got the same problem. waitng for response.

Right, looks to be Visual Studio IntelliCode as when I disabled that extension, problem went away.

Right, looks to be Visual Studio IntelliCode as when I disabled that extension, problem went away.

Right,so if disable it , only use redhat plugin for this work. but it seem like not other influence.

Right, looks to be Visual Studio IntelliCode as when I disabled that extension, problem went away.

That works for me

Right, looks to be Visual Studio IntelliCode as when I disabled that extension, problem went away.

Thanks! Works for me, was wondering why the snippets stopped working 10-15s after opening a project today

@testforstephen @akaroml I'm surprised QA didn't catch that one

Got the same issue, but decided to install the previous vscode-java version (0.54.2) instead of completly disabling IntelliCode (that is until this behavior is fixed by either one of the extensions)

Weird, I can't reproduce the issue. Can you guys try to call the "Clean the Java language server workspace" command? (F1)

Not sure if this helps: my snippets disappear locally, I uninstalled vscode and extensions fully, then only installed the java pack and the issue remained. (before finding this).

not sure all snippets disappear, but class and sysout do for me, attached is a screenshot showing the snippets provided with intellicode disabled and enabled:
dissaperingsnippets

Well yes vscjava.vscode-java-pack contains VisualStudioExptTeam.vscodeintellicode, version 1.2.2 which errors and prevents server side completion. Proper snippets defined in an extension naturally work. I did workspace reload few times before started to look deeper. Also re-enabling intellicode anyway asks you to reload.

@fbricon Removed my comment that it'd work on insiders, same issue after I fully restarted it.

Fix is on its way (https://github.com/eclipse/eclipse.jdt.ls/pull/1313)

@fbricon, I had the same problem and after installing the VSIX from your link, IntelliSense completion works fine again for me! 馃槉

Works fine for me as well

Ok thanks for checking. 0.55.1 is being rolled out on the VS Code Marketplace. Should be available in the next few minutes.

Thanks @fbricon ! I can confirm that this fix resolves the issue on my end also.
The reactivity is very much appreciated 馃憤

Thanks a bunch for a super quick fix!

fix quick,good job!

@testforstephen @akaroml I'm surprised QA didn't catch that one

Thanks to point it out. Currently the compatibility for the third party extensions are not well covered, i will update the test plan for this part.

@testforstephen @akaroml I'm surprised QA didn't catch that one

I was surprised too and sorry about that. As a follow-up, we'll:

  1. Add integration tests by installing Java Extension Pack instead of just vscode-java
  2. Make the test plan public so all parties can comment

@jdneo will be on this.

Was this page helpful?
0 / 5 - 0 ratings