Missing CheckRegistrar in SonarLint for IntelliJ WebStorm

Hmm, the automatic error report function creates strange (and very sparse) stuff…

So the issue is that each time I start IntelliJ WebStorm with the SonarLint plugin enabled I get a stack trace like the one below and I cannot run any analysis:

Environment:

  • Java version=11.0.11
  • Java vendor=JetBrains s.r.o.
  • OS name=Windows 10
  • OS architecture=amd64
  • IDE=WebStorm 2021.1.2
  • SonarLint version=4.16.0.31683
java.lang.NoClassDefFoundError: org/sonar/plugins/java/api/CheckRegistrar
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
	at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
	at org.sonar.classloader.ClassRealm.loadClassFromSelf(ClassRealm.java:125)
	at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:37)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
	at org.codehawk.plugin.java.MyJavaRulesPlugin.define(MyJavaRulesPlugin.java:17)
	at org.sonarsource.sonarlint.core.container.global.ExtensionInstaller.install(ExtensionInstaller.java:75)
	at org.sonarsource.sonarlint.core.container.global.ExtensionInstaller.install(ExtensionInstaller.java:65)
	at org.sonarsource.sonarlint.core.container.global.GlobalExtensionContainer.doBeforeStart(GlobalExtensionContainer.java:35)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:124)
	at org.sonarsource.sonarlint.core.container.storage.StorageContainer.doAfterStart(StorageContainer.java:139)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:126)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.start(ConnectedSonarLintEngineImpl.java:119)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.<init>(ConnectedSonarLintEngineImpl.java:78)
	at org.sonarlint.intellij.core.SonarLintEngineFactory.createEngine(SonarLintEngineFactory.java:88)
	at org.sonarlint.intellij.core.SonarLintEngineManager.getConnectedEngine(SonarLintEngineManager.java:126)
	at org.sonarlint.intellij.config.global.ServerConnectionMgmtPanel.switchTo(ServerConnectionMgmtPanel.java:286)
	at org.sonarlint.intellij.config.global.ServerConnectionMgmtPanel.onServerSelect(ServerConnectionMgmtPanel.java:274)
	at org.sonarlint.intellij.config.global.ServerConnectionMgmtPanel.lambda$create$0(ServerConnectionMgmtPanel.java:121)
	at java.desktop/javax.swing.JList.fireSelectionValueChanged(JList.java:1804)
	at java.desktop/javax.swing.JList$ListSelectionHandler.valueChanged(JList.java:1818)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:219)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:199)
	at java.desktop/javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:246)
	at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:443)
	at java.desktop/javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:453)