redhat-developer / redhat-developer/vscode-java

Java Language Server hangs while importing project

Open
#3,105 1 comment 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

When opening my work repository as a multi-root workspace, the Java Language Server seems to hang indefinitely while importing/refreshing the root project.

Environment
  • Operating System: Ubuntu 20.04.6
  • JDK version: 11 for the project, 17 for the extension
  • Visual Studio Code version: 1.78.2
  • Java extension version: 1.18.0
Steps To Reproduce

This happens as soon as I open my project in VSCode and the language server starts up. I can't link to the repository because it's private. This doesn't happen on smaller repositories.

Current Result

The language server output hangs after printing the output:

03ec6036 Reporting encoding changes. [Done]
f29dbd85 Importing root project: 31% Refreshing '<project root dir>'. [308/1000]
Expected Result

It should continue to import the project and then offer up the language features it advertises.

Additional Informations

Not sure if this is relevant, but sometime the output above shows a second message related to Gradle instead. We're currently migrating from using Maven to Gradle, and we have the structure for both build systems in the repository right now. I've disabled all the options for the Java LS extension related to Maven that I could find.

ls-client-logs.txt
ls-server-logs.txt

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 reviewing the attached ls-client-logs.txt and ls-server-logs.txt, then reproduce the hang by opening a large multi-root workspace in VS Code. Compare the Maven and Gradle import messages and verify that project import completes and language features become available.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.