When workspace up and initialized - SonarQube can be installed/enabled without any problems.
But when IDE gets restarted (with already installed and enabled SonarQube) - 100% CPU utilization and permanent errors in logs:
2025-10-20 09:51:33.975 [info] [Debug - 09:51:33.973] Skipping analysis of file not open in the editor: "file:///c:/Workspaces/git/testproject/testbackend/src/main/java/org/example/service/TestService.java"
2025-10-20 09:51:34.134 [info] [Error - 09:51:34.132] Unable to get Java config.
java.util.concurrent.TimeoutException
at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1960)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2095)
at org.sonarsource.sonarlint.ls.java.JavaConfigCache.getOrFetch(JavaConfigCache.java:64)
at org.sonarsource.sonarlint.ls.folders.ModuleEventsProcessor.lambda$isTestFile$3(ModuleEventsProcessor.java:128)
at org.sonarsource.sonarlint.ls.file.FileTypeClassifier.isTest(FileTypeClassifier.java:42)
at org.sonarsource.sonarlint.ls.folders.ModuleEventsProcessor.isTestFile(ModuleEventsProcessor.java:128)
at org.sonarsource.sonarlint.ls.folders.ModuleEventsProcessor.lambda$getClientFileDto$1(ModuleEventsProcessor.java:118)
at java.base/java.util.Optional.ifPresentOrElse(Optional.java:196)
at org.sonarsource.sonarlint.ls.folders.ModuleEventsProcessor.getClientFileDto(ModuleEventsProcessor.java:113)
at org.sonarsource.sonarlint.ls.folders.ModuleEventsProcessor.notifyBackendWithFileLanguageAndContent(ModuleEventsProcessor.java:95)
at org.sonarsource.sonarlint.ls.SonarLintLanguageServer.lambda$didOpen$6(SonarLintLanguageServer.java:454)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
also these:
2025-10-20 09:51:33.879 [info] [Error - 09:51:33.867] Unable to get Java config.
java.util.concurrent.RejectedExecutionException: Thread limit exceeded replacing blocked worker
at java.base/java.util.concurrent.ForkJoinPool.tryCompensate(ForkJoinPool.java:2000)
at java.base/java.util.concurrent.ForkJoinPool.compensatedBlock(ForkJoinPool.java:3737)
at java.base/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3723)
at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1939)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2095)
at org.sonarsource.sonarlint.ls.java.JavaConfigCache.getOrFetch(JavaConfigCache.java:64)
at org.sonarsource.sonarlint.ls.folders.ModuleEventsProcessor.lambda$isTestFile$3(ModuleEventsProcessor.java:128)
at org.sonarsource.sonarlint.ls.file.FileTypeClassifier.isTest(FileTypeClassifier.java:42)
at org.sonarsource.sonarlint.ls.folders.ModuleEventsProcessor.isTestFile(ModuleEventsProcessor.java:128)
at org.sonarsource.sonarlint.ls.folders.ModuleEventsProcessor.lambda$getClientFileDto$1(ModuleEventsProcessor.java:118)
at java.base/java.util.Optional.ifPresentOrElse(Optional.java:196)
at org.sonarsource.sonarlint.ls.folders.ModuleEventsProcessor.getClientFileDto(ModuleEventsProcessor.java:113)
at org.sonarsource.sonarlint.ls.folders.ModuleEventsProcessor.notifyBackendWithFileLanguageAndContent(ModuleEventsProcessor.java:95)
at org.sonarsource.sonarlint.ls.SonarLintLanguageServer.lambda$didOpen$6(SonarLintLanguageServer.java:454)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
Tried different projects, different workspaces. Single-module, multiple-modules, multi-root workspaces. Same issue.
Is it possible somehow prioritize the Issue in bugtracker?
I split out your reply into a separate new post. Thanks for reporting the issue!
SonarQube for IDE requires Java extension to be available in the IDE, we rely on it to fetch necessary Java-related configurations in order to run accurate analysis. The errors from the stacktrace indicate that fetching Java config failed.
Could you please share the list of extensions you have installed? And make sure it includes redhat.java extension?
It might be that the Java extension was not properly activated for some reason. Did the issue start appearing recently?
As wrote earlier: Java extension works fine unless I activate SonarQube extension and restart IDE.
If I activate SonarQube on already running and initialized Windsurf - it also works just fine.
But problems start when I start IDE with previously activated SonarQube.
Same problem I had back in January, when was using another computer with another version of Windows and was using VSCode as IDE, and earlier version of SonarQube. Didn’t find proper solution back then, so was deactivating the extension most of the time.
This is very strange and for the moment I cannot reproduce (tried on a Gradle project with Java and SonarQube for IDE extensions installed, and the issues are detected).
Maybe when you start the IDE, if you have a Java file open right away, SonarQube tries to trigger analysis but the Java extension is not initialized yet at that point? Would you be able to share a screenshot of how long was taken by Java extension activation? (141ms in my screenshot) and the SonarQube for IDE activation? And finally, if you could also provide an example file that triggers the failures, it would be a great help!!
I reproduced an issue on a Windows machine (not consistently though). It happened while SonarQube analysis was started before Java project was loaded in the IDE BUT, importantly, even though I had the error logs in the output, once the project was loaded, the analysis results still appeared (see screenshot). Do you observe the same? Or are issues never coming up?
Start Windsurf, open Workspace with 2 Gradle-based Java modules. Wait till workspace is fully initialized. Close all editors.
Activate SonarQube extension. Extension is loaded within 268ms. CPU usage pikes for a minute. After a minute, project get analyzed, CPU drops downs to 0, analysis results is displayed on SonarQube tab. (see screenshot)
Exit Winsurf. Wait for couple minutes, to make sure no java.exe processes left running (checked in processes view).
Start Windsurf. Java extension gets initialized within 291ms, SonarQube within 489ms. But CPU usage raises to 100%, SonarQube logs gets filled with Timeout and Thread limit exceptions. No problem analysis results available. This state is now forever. The only option is available - deactivate extension and restart IDE.
Sorry for the delay. We have not forgotten about you
I’ve been trying to reproduce the issue but with no success. i.e. I have this - similar error as you with timeout, but once the Java extension is loaded, SonarQube for IDE also recovers and starts analyzing Java files.
I will try to install exactly the same set of extensions as you have and see if something changes.
I’ve updated my ‘vanilla’ VSCode (original, from Microsoft, not using for several months already, as migrated to Windsurf), and it seems they have tuned something. Now I’m not getting any exceptions on SonarQube initialization on startup of VSCode.
VSCode OSS Version is one minor version behind, but I didn’t find in changes anything significant. May be i’ve overseen it. Or it’s caused by some default parameters, which are not perfectly fine tuned in Windsurf.
When you migrated to Windsurf, did you use their automatic migration feature? i.e. one that directly moves your VSCode config to Windsurf? Or you started on Windsurf from scratch?
When you migrated to Windsurf, did you use their automatic migration feature? i.e. one that directly moves your VSCode config to Windsurf? Or you started on Windsurf from scratch?
I tried both: migration and clean install (first tried to delete profiles and recreate them from scratch, but then clean install).
Also, yesterday, when realized VSCode works now, I also synchronized my user settings.json, to make sure all JVM settings are same in both IDE’s. But seems nothing from custom settings affects on why VSCode is fine, but Windsurf fails. Either some defaults are different, or internal IDE params (or 105.1 fixes something).