SonarLint extension v4.5.0 is failed to save SonarQube connection in Connected mode

  • Operating system: Windows 10
  • SonarLint plugin version: 4.5.0
  • Programming language you’re coding in: Java
  • Is connected mode used: Yes
    • Connected to SonarQube version 8.9.10 (build 61524)

SonarLint failed save SonarQube connection with below error:

[Error - 14:40:03.776] Internal error: java.lang.reflect.InvocationTargetException
[Error - 14:40:03.776] java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$recursiveFindRpcMethods$0(GenericEndpoint.java:67)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
    at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.reflect.InvocationTargetException: null
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$recursiveFindRpcMethods$0(GenericEndpoint.java:65)
... 11 common frames omitted
Caused by: java.lang.IllegalStateException: Backend service not initialized in time
    at org.sonarsource.sonarlint.ls.backend.BackendServiceFacade.getBackendService(BackendServiceFacade.java:108)
    at org.sonarsource.sonarlint.ls.SonarLintLanguageServer.checkConnection(SonarLintLanguageServer.java:639)
... 16 common frames omitted

Hi there @Venkateswara_Reddy_K, and welcome to Sonar Community! :wave: :sonar:

Thanks for reporting this error. In order to investigate your issue, we would need full SonarLint logs. You can find the instructions on how to get them here. The logs should start with a line similar to Executing /usr/bin/java -jar /Users/me/.vscode/extensions/sonarsource.sonarlint-vscode-4.5.0/server/sonarlint-ls.jar

Last but not least, please note that your SonarQube version is quite old, and the connections to this version of SonarQube will soon be disallowed from SonarLint. So if you have the chance, now is the good time to upgrade your SonarQube instance to either the latest LTA (9.9) or the latest release (10.5). You will find many helpful resources here.

Thanks in advance,
Sophio from :sonarlint_vscode:

Don’t mind. This is resolved automatically. Looks like an intermittent error.