redhat-developer / redhat-developer/vscode-java

No auto-completion, no marking of compilation errors, etc.

Open
#4,080 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

I've done Clean Java Language Server Workspace, activated the "heavyweight mode" and waited for Java: Ready, but the extension still barely offers any support. Stack traces from the logs:

[Error - 11:33:40 AM] Request textDocument/codeAction failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.IMethod.getCompilationUnit()" because "iMethod" is null
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.IMethod.getCompilationUnit()" because "iMethod" is null
	at org.eclipse.jdt.internal.corext.refactoring.code.makestatic.InitialConditionsChecker.checkSourceAvailable(InitialConditionsChecker.java:181)
	at org.eclipse.jdt.internal.corext.refactoring.code.MakeStaticRefactoring.checkInitialConditions(MakeStaticRefactoring.java:127)
	at org.eclipse.jdt.ls.core.internal.corrections.RefactorProcessor.getMakeMethodStaticRefactoringProposal(RefactorProcessor.java:1189)
	at org.eclipse.jdt.ls.core.internal.corrections.RefactorProcessor.getProposals(RefactorProcessor.java:228)
	at org.eclipse.jdt.ls.core.internal.handlers.CodeActionHandler.getCodeActionCommands(CodeActionHandler.java:221)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$15(JDTLanguageServer.java:775)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
	... 7 more
java.util.concurrent.CompletionException: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 1
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 1
	at org.eclipse.jdt.internal.corext.fix.AddMissingMethodDeclarationFixCore$AddMissingMethodDeclarationProposalOperation.rewriteAST(AddMissingMethodDeclarationFixCore.java:241)
	at org.eclipse.jdt.internal.corext.fix.CompilationUnitRewriteOperationsFixCore.createChange(CompilationUnitRewriteOperationsFixCore.java:123)
	at org.eclipse.jdt.ls.core.internal.text.correction.QuickAssistProcessor.getAddMissingMethodDeclarationProposal(QuickAssistProcessor.java:1459)
	at org.eclipse.jdt.ls.core.internal.text.correction.QuickAssistProcessor.getAssists(QuickAssistProcessor.java:237)
	at org.eclipse.jdt.ls.core.internal.handlers.CodeActionHandler.getCodeActionCommands(CodeActionHandler.java:233)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$15(JDTLanguageServer.java:775)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
	... 7 more
SEVERE: Internal error: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
java.util.concurrent.CompletionException: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
	at java.base/java.util.Objects.checkIndex(Unknown Source)
	at java.base/java.util.ArrayList.get(Unknown Source)
	at org.eclipse.jdt.ls.core.internal.text.correction.QuickAssistProcessor.getTryWithResourceProposals(QuickAssistProcessor.java:1014)
	at org.eclipse.jdt.ls.core.internal.text.correction.QuickAssistProcessor.getTryWithResourceProposals(QuickAssistProcessor.java:936)
	at org.eclipse.jdt.ls.core.internal.text.correction.QuickAssistProcessor.getAssists(QuickAssistProcessor.java:238)
	at org.eclipse.jdt.ls.core.internal.handlers.CodeActionHandler.getCodeActionCommands(CodeActionHandler.java:233)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$15(JDTLanguageServer.java:775)
	at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
	... 7 more

pre-release extension version 1.43.2025061908

Version: 1.101.1 (user setup)
Commit: 18e3a1ec544e6907be1e944a94c496e302073435
Date: 2025-06-18T13:35:12.605Z
Electron: 35.5.1
ElectronBuildId: 11727614
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Windows_NT x64 10.0.22631

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported CodeActionHandler paths and the three stack traces, following RefactorProcessor, QuickAssistProcessor, and JDTLanguageServer. Reproduce the failures in the listed VS Code and extension versions, then determine the affected code-action flows. Done means these internal errors are resolved and completion and compilation-error support works in the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.