Language Support for Java fails to initialize: command 'sts.java.addClasspathListener' already exists
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 45/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- java, spring-boot, typescript, vscode
研究方向
從重複出現的 JDT Language Server 日誌開始,檢查 JDTLanguageServer.synchronizeBundles 和 JavaClientConnection.java:89,回報的失敗會在這裡顯現。啟用 Language Support for Java 和 Spring Boot Tools 後重現問題,接著追蹤 sts.java.addClasspathListener 和 workspace/executeClientCommand 的註冊;完成條件是伺服器建立連線、命令只註冊一次,且 Maven 工作區載入完成。
由索引模型根據 Issue 內容生成。
描述
Describe the bug
Language Support for Java never finishes loading in VS Code. The Java status remains in an infinite loading state, and the Java language server client reports that it could not create a connection to the server.
The following error is displayed on every startup:
Language Support for Java client: couldn't create connection to server.
Error: command 'sts.java.addClasspathListener' already exists
The issue was first observed with Java extension version 1.56.0 and persists after updating to version 1.57.2026090408.
To Reproduce
- Start Visual Studio Code with both Language Support for Java by Red Hat and Spring Boot Tools enabled.
- Open a Maven-based Spring Boot Java workspace.
- Wait for Language Support for Java to initialize.
- Observe that the Java loading status never completes.
- Observe the notification reporting:
Language Support for Java client: couldn't create connection to server.
Error: command 'sts.java.addClasspathListener' already exists
I have run Java: Clean Java Language Server Workspace with restart and deletion numerous times. The workspace is recreated, but the error and infinite loading state persist.
JDT Language Server log
The following initialization and error cycle is repeated multiple times:
!ENTRY org.eclipse.jdt.ls.core 1 0 2026-09-10 02:53:14.677
!MESSAGE >> initialize
!ENTRY org.eclipse.jdt.ls.core 1 0 2026-09-10 02:53:14.678
!MESSAGE Initializing JDT Language Server (Standard)
Version: 1.62.0-SNAPSHOT (OSGi 1.62.0.202609040812)
Git Commit: 126afcd - Upversion to 1.62.0
!ENTRY org.eclipse.jdt.ls.core 1 0 2026-09-10 02:53:14.738
!MESSAGE Importers: GradleBuildServerProjectImporter, GradleProjectImporter, MavenProjectImporter, EclipseProjectImporter, InvisibleProjectImporter
!ENTRY org.eclipse.jdt.ls.core 1 0 2026-09-10 02:53:14.824
!MESSAGE Progressive import: reporting 1 new project(s)
!ENTRY org.eclipse.jdt.ls.core 1 0 2026-09-10 02:53:14.827
!MESSAGE Workspace initialized in 98ms
!ENTRY org.eclipse.jdt.ls.core 4 0 2026-09-10 02:53:16.795
!MESSAGE org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Unhandled method workspace/executeClientCommand
!STACK 0
java.util.concurrent.CompletionException: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Unhandled method workspace/executeClientCommand
at java.base/java.util.concurrent.CompletableFuture.reportJoin(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.join(Unknown Source)
at org.eclipse.jdt.ls.core.internal.JavaClientConnection.executeClientCommand(JavaClientConnection.java:89)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.synchronizeBundles(JDTLanguageServer.java:464)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer$2.run(JDTLanguageServer.java:324)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Unhandled method workspace/executeClientCommand
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:214)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:198)
at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.lambda$1(ParentProcessWatcher.java:86)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:189)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:97)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:97)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Expected behavior
Language Support for Java should connect to the Java language server successfully, register its commands only once, and finish loading the Maven project without an infinite loading state.
Environment
- Operating System: Windows 11 x64
- JDK version: Oracle JDK 25.0.4.1+1 LTS
- Visual Studio Code version: 1.137.0 (commit 645f29cc3176500b4b5762ba887cf2a7f0ffdf2c)
- Java extension version: 1.57.2026090408 (win32-x64)
- Spring Boot Tools version: 2.4.0
- Project type: Private Maven-based Spring Boot project using Spring Boot 4.0.8 and Java 25
Additional Information
The affected project is private, so I cannot attach it. I have not yet isolated a minimal reproducible project.
The JDT Language Server log also repeatedly contains the following error during initialization:
org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Unhandled method workspace/executeClientCommand
The stack trace points to JDTLanguageServer.synchronizeBundles.
Spring Boot Tools is installed and enabled. The sts.java.addClasspathListener command name suggests that the failure may involve the Spring Tools integration, but this is only a hypothesis; I have not confirmed the root cause.
- 主要語言
- TypeScript
- 星號
- 2.3k
- 分支
- 547
- 平均合併
- 20 小時 1 分鐘
- 30 天內合併 PR
- 11
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
redhat-developer/vscode-java 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
redhat-developer/vscode-java#4426 ·
-
bug
難度 4/5 3-5 天 新手友好度 45/100
redhat-developer/vscode-java#4506 · 3 則留言 · 4 個 reaction ·
-
難度 4/5 3-5 天 新手友好度 52/100
redhat-developer/vscode-java#4504 · 3 則留言 · 1 個 reaction ·
-
bug
難度 3/5 1-2 天 新手友好度 62/100
redhat-developer/vscode-java#4502 ·
-
bug
難度 4/5 3-5 天 新手友好度 38/100
redhat-developer/vscode-java#4500 · 3 則留言 ·
查看 redhat-developer/vscode-java 的全部 Issue
相似的 Issue
-
comp/dashboard P3 type/bug
難度 2/5 1-3 小時 新手友好度 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
難度 2/5 1-3 小時 新手友好度 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難度 1/5 1 小時以內 新手友好度 76/100
-
code-quality refactoring
難度 2/5 1-3 小時 新手友好度 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
難度 2/5 1-3 小時 新手友好度 74/100
langchain-ai/deepagents#6450 ·