VS Code extension throws ClassNotFoundException for org.apache.commons.text.StringEscapeUtils

  • Operating system: Ubuntu 24.04 LTS
  • SonarQube for VS Code plugin version: 4.29.0
  • Programming language you’re coding in: C/C++
  • Is connected mode used: Yes
    • SonarQube Cloud, SonarQube Server, or SonarQube Community Build? (if one of the latter two, which version?): 2025.4.2

And a thorough description of the problem / question:

I decided to try the VS Code extension today and out of the box, it gives me this error when I click the “Open in IDE” button in SonarQube:

2025-08-29 16:31:47.996 [info] [Debug - 16:31:47.996] [sonarlint : Show Issue or Hotspot Request Handler] Assist connection and binding if needed for project Accelerator-SonarScan and server https://aap-sonarqube.prog.altair.com
2025-08-29 16:31:48.021 [info] [Debug - 16:31:48.020] [sonarlint : Show Issue or Hotspot Request Handler] No binding clues were found
2025-08-29 16:31:48.022 [info] [Debug - 16:31:48.020] [sonarlint : Show Issue or Hotspot Request Handler] Match connections...
2025-08-29 16:31:48.022 [info] [Debug - 16:31:48.020] [sonarlint : Show Issue or Hotspot Request Handler] 0 clues having at least one matching connection
2025-08-29 16:31:48.034 [info] [Debug - 16:31:48.034] [sonarlint : Show Issue or Hotspot Request Handler] No binding clues were found
2025-08-29 16:31:48.035 [info] [Debug - 16:31:48.034] [sonarlint : Show Issue or Hotspot Request Handler] Match connections...
2025-08-29 16:31:48.035 [info] [Debug - 16:31:48.034] [sonarlint : Show Issue or Hotspot Request Handler] 0 clues having at least one matching connection
2025-08-29 16:31:48.055 [info] [Debug - 16:31:48.054] [sonarlint : Show Issue or Hotspot Request Handler] No binding clues were found
2025-08-29 16:31:48.055 [info] [Debug - 16:31:48.055] [sonarlint : Show Issue or Hotspot Request Handler] Match connections...
2025-08-29 16:31:48.055 [info] [Debug - 16:31:48.055] [sonarlint : Show Issue or Hotspot Request Handler] 0 clues having at least one matching connection
2025-08-29 16:31:48.078 [info] [stderr] Exception in thread "Show Issue or Hotspot Request Handler" java.lang.NoClassDefFoundError: org/apache/commons/text/StringEscapeUtils
2025-08-29 16:31:48.078 [info] [stderr] 	at org.sonarsource.sonarlint.core.embedded.server.RequestHandlerBindingAssistant.assistBinding(RequestHandlerBindingAssistant.java:224)
2025-08-29 16:31:48.078 [info] [stderr] 	at org.sonarsource.sonarlint.core.embedded.server.RequestHandlerBindingAssistant.assistBindingAndWaitForRepositoryUpdate(RequestHandlerBindingAssistant.java:173)
2025-08-29 16:31:48.078 [info] [stderr] 	at org.sonarsource.sonarlint.core.embedded.server.RequestHandlerBindingAssistant.assistBindingIfNeeded(RequestHandlerBindingAssistant.java:159)
2025-08-29 16:31:48.078 [info] [stderr] 	at org.sonarsource.sonarlint.core.embedded.server.RequestHandlerBindingAssistant.assistConnectionAndBindingIfNeeded(RequestHandlerBindingAssistant.java:118)
2025-08-29 16:31:48.078 [info] [stderr] 	at org.sonarsource.sonarlint.core.embedded.server.RequestHandlerBindingAssistant.lambda$assistConnectionAndBindingIfNeededAsync$0(RequestHandlerBindingAssistant.java:88)
2025-08-29 16:31:48.078 [info] [stderr] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
2025-08-29 16:31:48.078 [info] [stderr] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
2025-08-29 16:31:48.078 [info] [stderr] 	at java.base/java.lang.Thread.run(Unknown Source)
2025-08-29 16:31:48.078 [info] [stderr] Caused by: java.lang.ClassNotFoundException: org.apache.commons.text.StringEscapeUtils
2025-08-29 16:31:48.078 [info] [stderr] 	... 8 more
2025-08-29 16:31:48.078 [info] [Debug - 16:31:48.077] [sonarlint : Show Issue or Hotspot Request Handler] No binding clues were found
2025-08-29 16:31:48.078 [info] [Debug - 16:31:48.077] [sonarlint : Show Issue or Hotspot Request Handler] Match connections...
2025-08-29 16:31:48.079 [info] [Debug - 16:31:48.077] [sonarlint : Show Issue or Hotspot Request Handler] 0 clues having at least one matching connection
2025-08-29 16:31:48.079 [info] [Error - 16:31:48.077] [sonarlint : Show Issue or Hotspot Request Handler] An error occurred while executing a task in Show Issue or Hotspot Request Handler
2025-08-29 16:31:48.079 [info] [Error - 16:31:48.077] [sonarlint : Show Issue or Hotspot Request Handler] java.lang.NoClassDefFoundError: org/apache/commons/text/StringEscapeUtils
	at org.sonarsource.sonarlint.core.embedded.server.RequestHandlerBindingAssistant.assistBinding(RequestHandlerBindingAssistant.java:224)
	at org.sonarsource.sonarlint.core.embedded.server.RequestHandlerBindingAssistant.assistBindingAndWaitForRepositoryUpdate(RequestHandlerBindingAssistant.java:173)
	at org.sonarsource.sonarlint.core.embedded.server.RequestHandlerBindingAssistant.assistBindingIfNeeded(RequestHandlerBindingAssistant.java:159)
	at org.sonarsource.sonarlint.core.embedded.server.RequestHandlerBindingAssistant.assistConnectionAndBindingIfNeeded(RequestHandlerBindingAssistant.java:118)
	at org.sonarsource.sonarlint.core.embedded.server.RequestHandlerBindingAssistant.lambda$assistConnectionAndBindingIfNeededAsync$0(RequestHandlerBindingAssistant.java:88)
	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)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.text.StringEscapeUtils
	... 8 more

I have tried with the default for JAVA_HOME in the extension settings and also with /usr/lib/jvm/java-21-openjdk-amd64.

1 Like

Hi there @janes :waving_hand:

Thanks a lot for the report! :person_bowing: Indeed, there is a bug in the current version that prevents Open in IDE feature to work properly. This has now been fixed and will be part of the version 4.30.

Apologies for the inconvenience and all the best,
Sophio

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.