Exception in thread "SonarLint analysis" - Could not initialize class sun.security.ssl.SSLContextImpl

Hello, I am using TypeScript-3.9.7, SonarLint plugin - v1.18.0 for Visual Studio Code - 1.50.1,durning analysis started to see

[stderr] Exception in thread “SonarLint analysis”
[stderr] java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext

attaching detailed logs.SonarLint-ts-SSLContextImpl-error.log (6.1 KB)

Thanks in advance


This error may be caused by the JRE that is used to run the SonarLint Language Server. Can you find the exact version that is used? When starting VSCode, this should be the first line in the SonarLint Output if verbose output is enabled.
Something like:

Executing /lib/jvm/java-15-openjdk/bin/java -jar /home/julien/.vscode/extensions/sonarsource.sonarlint-vscode-1.18.0/server/sonarlint-ls.jar 42537 [...]

To enable verbose output, add to VSCode global settings:

"sonarlint.output.showVerboseLogs": true


Executing C:\Program Files\SapMachine\JDK\11\bin\java -jar c:\Users\I537607.vscode\extensions\sonarsource.sonarlint-vscode-1.19.0\server\sonarlint-ls.jar 59167 file:///c:/Users/I537607/.vscode/extensions/sonarsource.sonarlint-vscode-1.19.0/analyzers/sonarjava.jar file:///c:/Users/I537607/.vscode/extensions/sonarsource.sonarlint-vscode-1.19.0/analyzers/sonarjs.jar file:///c:/Users/I537607/.vscode/extensions/sonarsource.sonarlint-vscode-1.19.0/analyzers/sonarphp.jar file:///c:/Users/I537607/.vscode/extensions/sonarsource.sonarlint-vscode-1.19.0/analyzers/sonarpython.jar file:///c:/Users/I537607/.vscode/extensions/sonarsource.sonarlint-vscode-1.19.0/analyzers/sonarhtml.jar

Java running on my system is openjdk 11.0.8 2020-07-15 LTS

Thanks, I will try to reproduce with the same JDK.

In the meantime you can try downloading a “regular JDK” (like AdoptOpenJdk), or even a more recent version of SapMachineJdk,
unzip it somewhere, and then tell SonarLint to use it by changing the VSCode setting sonarlint.ls.javaHome.

I was not able to reproduce (on Linux) so either this is specific to Windows, or the problem is caused by a modification of your JDK (maybe some custom SSL parameters).
As I suggested in my previous message, please try with a clean JDK freshly downloaded from AdoptOpenJdk, and let us know how it goes.

Pointing to JDK fresh installation solved the issues. Thank you for your help.

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