spring-tools: Spring Boot Tools Plugin Causes Java Searching to Hang in Large Projects (3300 Java Files)
Describe the bug
When loading a Spring Boot project containing approximately 3300 Java files, the Spring Boot Tools plugin (v1.58.0) causes the Java Searching phase of the Java Extension Pack to be stuck for a prolonged period, and the project fails to load. However, disabling the Spring Boot Tools plugin ensures that the Java Searching phase completes successfully. Additionally, the issue persists even when using the pre-release version of Spring Boot Tools. While the project is stuck, an exception is observed in the Spring Boot Tools logs, which seems to be related to the issue.
To Reproduce
- Install: • Spring Boot Tools (v1.58.0 or pre-release). • Java Extension Pack (including Language Support for Java™ by Red Hat v1.37.0).
- Use Remote SSH to open a Spring Boot project with 3300 Java files.
- Observe that Java Searching gets stuck.
- Check the Spring Boot Tools logs for an exception.
- Disable Spring Boot Tools and reload the project; it loads successfully.
log
19:32:43.343 [pool-3-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.343 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - request for workspace symbols arrived: @/
19:32:43.343 [pool-3-thread-2] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.343 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - request for workspace symbols arrived: @/
19:32:43.343 [pool-3-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.343 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - request for workspace symbols arrived: @/
19:32:43.343 [pool-3-thread-2] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.343 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - request for workspace symbols arrived: @/
19:32:43.343 [pool-3-thread-2] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.343 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - request for workspace symbols arrived: @/
19:32:43.343 [pool-3-thread-2] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.343 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - request for workspace symbols arrived: @/
19:32:43.343 [pool-3-thread-2] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.343 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - request for workspace symbols arrived: @/
19:32:43.343 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - request for workspace symbols arrived: @/
19:32:43.343 [pool-3-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.343 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - request for workspace symbols arrived: @/
19:32:43.343 [pool-3-thread-6] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.343 [pool-3-thread-2] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.343 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - request for workspace symbols arrived: @/
19:32:43.343 [pool-3-thread-2] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.343 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - request for workspace symbols arrived: @/
19:32:43.343 [pool-3-thread-2] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.343 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - request for workspace symbols arrived: @/
19:32:43.343 [pool-3-thread-6] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - workspace symbol computation done: 0
19:32:43.512 [Simple-Language-Server main thread] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - file created event: [file:///home/frost/codes/work/test/.attach_pid237143]
19:32:43.513 [Simple-Language-Server main thread] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - file deleted event: [file:///home/frost/codes/work/test/.attach_pid237143]
19:32:50.331 [parallel-5] ERROR o.s.i.v.b.jdt.ls.JdtLsProjectCache - Unexpected error registering classpath listener with JDT.
java.util.concurrent.TimeoutException: Did not observe any item or terminal signal within 10000ms in 'Mono.thenReturn ⇢ at org.springframework.ide.vscode.commons.languageserver.java.ls.ClasspathListenerManager.addClasspathListener(ClasspathListenerManager.java:144)' (and no fallback has been configured)
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.handleTimeout(FluxTimeout.java:296)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Assembly trace from producer [reactor.core.publisher.MonoTimeout] :
reactor.core.publisher.Mono.timeout(Mono.java:5008)
org.springframework.ide.vscode.boot.jdt.ls.JdtLsProjectCache.enableClasspathListener(JdtLsProjectCache.java:274)
Error has been observed at the following site(s):
*________Mono.timeout ⇢ at org.springframework.ide.vscode.boot.jdt.ls.JdtLsProjectCache.enableClasspathListener(JdtLsProjectCache.java:274)
|_ Mono.doOnSubscribe ⇢ at org.springframework.ide.vscode.boot.jdt.ls.JdtLsProjectCache.enableClasspathListener(JdtLsProjectCache.java:275)
|_ Mono.doOnSuccess ⇢ at org.springframework.ide.vscode.boot.jdt.ls.JdtLsProjectCache.enableClasspathListener(JdtLsProjectCache.java:276)
Original Stack Trace:
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.handleTimeout(FluxTimeout.java:296)
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.doTimeout(FluxTimeout.java:281)
at reactor.core.publisher.FluxTimeout$TimeoutTimeoutSubscriber.onNext(FluxTimeout.java:420)
at reactor.core.publisher.FluxOnErrorReturn$ReturnSubscriber.onNext(FluxOnErrorReturn.java:162)
at reactor.core.publisher.MonoDelay$MonoDelayRunnable.propagateDelay(MonoDelay.java:270)
at reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:285)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
19:32:50.333 [parallel-5] INFO o.s.i.v.b.jdt.ls.JdtLsProjectCache - Enable classpath listener enabled = false current enablement = true
19:32:50.333 [parallel-5] INFO o.s.i.v.b.jdt.ls.JdtLsProjectCache - Removing classpath listener enabled=false
19:32:50.333 [parallel-5] INFO o.s.i.v.b.jdt.ls.JdtLsProjectCache - Project Observer is not supported
19:32:50.333 [parallel-5] ERROR reactor.core.publisher.Operators - Operator called default onErrorDropped
reactor.core.Exceptions$ErrorCallbackNotImplemented: java.util.concurrent.TimeoutException: Did not observe any item or terminal signal within 10000ms in 'Mono.thenReturn ⇢ at org.springframework.ide.vscode.commons.languageserver.java.ls.ClasspathListenerManager.addClasspathListener(ClasspathListenerManager.java:144)' (and no fallback has been configured)
Caused by: java.util.concurrent.TimeoutException: Did not observe any item or terminal signal within 10000ms in 'Mono.thenReturn ⇢ at org.springframework.ide.vscode.commons.languageserver.java.ls.ClasspathListenerManager.addClasspathListener(ClasspathListenerManager.java:144)' (and no fallback has been configured)
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.handleTimeout(FluxTimeout.java:296)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Assembly trace from producer [reactor.core.publisher.MonoTimeout] :
reactor.core.publisher.Mono.timeout(Mono.java:5008)
org.springframework.ide.vscode.boot.jdt.ls.JdtLsProjectCache.enableClasspathListener(JdtLsProjectCache.java:274)
Error has been observed at the following site(s):
*________Mono.timeout ⇢ at org.springframework.ide.vscode.boot.jdt.ls.JdtLsProjectCache.enableClasspathListener(JdtLsProjectCache.java:274)
|_ Mono.doOnSubscribe ⇢ at org.springframework.ide.vscode.boot.jdt.ls.JdtLsProjectCache.enableClasspathListener(JdtLsProjectCache.java:275)
|_ Mono.doOnSuccess ⇢ at org.springframework.ide.vscode.boot.jdt.ls.JdtLsProjectCache.enableClasspathListener(JdtLsProjectCache.java:276)
|_ Mono.doOnError ⇢ at org.springframework.ide.vscode.boot.jdt.ls.JdtLsProjectCache.enableClasspathListener(JdtLsProjectCache.java:277)
Original Stack Trace:
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.handleTimeout(FluxTimeout.java:296)
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.doTimeout(FluxTimeout.java:281)
at reactor.core.publisher.FluxTimeout$TimeoutTimeoutSubscriber.onNext(FluxTimeout.java:420)
at reactor.core.publisher.FluxOnErrorReturn$ReturnSubscriber.onNext(FluxOnErrorReturn.java:162)
at reactor.core.publisher.MonoDelay$MonoDelayRunnable.propagateDelay(MonoDelay.java:270)
at reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:285)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
19:35:38.865 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleTextDocumentService - Closed: file:///home/frost/codes/work/test/yudao-module-infra/yudao-module-infra-biz/src/test/resources/logback.xml
19:35:38.865 [pool-13-thread-1] INFO o.s.i.v.b.j.u.CompilationUnitCache - Invalidate AST for file:///home/frost/codes/work/test/yudao-module-infra/yudao-module-infra-biz/src/test/resources/logback.xml
19:35:39.492 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleTextDocumentService - Closed: file:///home/frost/codes/work/test/yudao-module-system/yudao-module-system-biz/src/test/resources/logback.xml
19:35:39.492 [pool-13-thread-1] INFO o.s.i.v.b.j.u.CompilationUnitCache - Invalidate AST for file:///home/frost/codes/work/test/yudao-module-system/yudao-module-system-biz/src/test/resources/logback.xml
19:35:41.966 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleTextDocumentService - Closed: file:///home/frost/codes/work/test/yudao-server/src/main/resources/logback-spring.xml
19:35:41.966 [pool-13-thread-1] INFO o.s.i.v.b.j.u.CompilationUnitCache - Invalidate AST for file:///home/frost/codes/work/test/yudao-server/src/main/resources/logback-spring.xml
19:36:54.083 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleLanguageServer - shutdown: request arrived
19:36:54.084 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleLanguageServer - shutdown: call shutdown handler
19:36:54.087 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleLanguageServer - shutdown: complete
19:36:54.094 [pool-13-thread-1] INFO o.s.i.v.c.l.u.SimpleLanguageServer - exit: notification received
19:54:44.687 [Simple-Language-Server main thread] INFO o.s.i.v.c.l.u.SimpleWorkspaceService - file created event: [file:///home/frost/codes/work/test/.git/index]
Sample
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (8 by maintainers)
Unfortunately, this problem still exists.
Environment
What Happend
When I open the project, the build always gets stuck at:
I tried running Java: Clean Java Language Server Workspace and mvn clean, and even reinstalled the plugin, but none of it worked.
If I disable
vmware.vscode-spring-bootplugin, all problems are solved.logs when disable
vmware.vscode-spring-bootpluginlogs enable
vmware.vscode-spring-bootpluginredhat.java plugin syntax server log:
Thank you for taking the time to investigate this issue. Yes, after disabling the Spring Boot Dashboard, I was also able to build successfully. Previously, I mentioned that I had disabled Spring Boot Tools, not realizing that it would also disable the Spring Boot Dashboard plugin. So, this isn’t an issue with Spring Boot Tools, right? Things have gotten a bit tricky.
Harder,Better,Faster,Stronger.
Martin Lippert @.***>于2025年1月27日 周一18:26写道:
@CloudSen Thanks for updating this issue with all the details, much appreciated. I have a few questions:
@Skyxim thanks for the sample project!!! I wasn’t able to reproduce the issue so far. By “Once in 3 times” you mean you execute “Reload Window” command in VSCode and every third time you see “Searching…” op from Java tooling gets stuck at startup, correct? I noticed some odd log statements on the Java Tooling log. Closer to the end Java LS received a “shutdown” message and started stopping plugins. At the same time Spring LS attempts to register classpath listeners and fails because Java LS already stopped many bundles hence classpath listener fails to be registered:
I’d try and look for the reason for the shutdown on the Java LS side… All of this requires investigation…
Edited and attached the springboot tools log when the problem occurred
Java Log
Spring Log
Can you take a look into the log of the Java tooling as well and attach the output here? (both the java extension log and the java language server log
You can open both via the command for
Java: Open All Log FilesThe exception above looks like the Spring tooling waits too long for the Java tooling to respond when registering some listeners, so might be worth looking into what happens over there as well.
If you import the project without the Spring Tools enabled, how long does it take for the project to be fully imported and the Java tooling is done with background jobs?