redhat-developer / redhat-developer/vscode-java

NullPointerException in Jakarta EE Server Initialization

Open
#3,205 0 comments 0 reactions 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

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.0 I believe)
Steps To Reproduce
  1. Build project, open file.
  2. Click somewhere within the code.
  3. See error.
Current Result

2023-07-17 at 12 52 53@2x
2023-07-17 at 12 53 03@2x

Expected Result

No errors.

Additional Informations

java-server.log

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.