redhat-developer / redhat-developer/vscode-java
NullPointerException in Jakarta EE Server Initialization
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
When clicking on variables in a Java project, an error occurs in the Jakarta EE server initialisation process. The error message indicates a NullPointerException during the execution of the org.eclipse.lsp4j.Diagnostic.getCode() method, specifically when trying to invoke org.eclipse.lsp4j.jsonrpc.messages.Either.getLeft(). As a result, the request textDocument/codeAction fails repeatedly, showing error code -32603. Additionally, in some cases, there are warnings for unmatched cancel notifications and errors indicating that the client is not running.
Environment
- Operating System:
MacOS (Ventura 13.4) - JDK version:
temurin-11 - Visual Studio Code version:
1.80.1 - Java extension version: Latest at this time (
1.20.0I believe)
Steps To Reproduce
- Build project, open file.
- Click somewhere within the code.
- See error.
Current Result
Expected Result
No errors.
Additional Informations
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure using the listed MacOS, JDK, VS Code, and Java extension environment, then inspect java-server.log. Trace the textDocument/codeAction path around org.eclipse.lsp4j.Diagnostic.getCode() and Either.getLeft(). Done means clicking in the Java project no longer produces the NullPointerException or repeated -32603 errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100