Sonar lint unable to bind to SONAR project server using SONAR lint

sonarlint
sonarqube

(varun) #1

Unable to bind to a project located on a SONARQUBE server

  • versions used
    SONAR qube server : 6.7.3,
    SONAR lint : 4.0
    Eclipse 2018-2019
  • error observed :
    When ever i try to bind a project to a project located in server, i receive the following error :
java.lang.NoClassDefFoundError: org/sonar/api/batch/Sensor
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	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 com.mwz.sonar.scala.ScalaPlugin.define(ScalaPlugin.scala:115)
	at org.sonarsource.sonarlint.core.container.global.ExtensionInstaller.install(ExtensionInstaller.java:62)
	at org.sonarsource.sonarlint.core.container.global.GlobalExtensionContainer.doBeforeStart(GlobalExtensionContainer.java:35)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonarsource.sonarlint.core.container.storage.StorageContainer.doAfterStart(StorageContainer.java:126)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:125)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.start(ConnectedSonarLintEngineImpl.java:118)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$update$2(ConnectedSonarLintEngineImpl.java:176)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withRwLock(ConnectedSonarLintEngineImpl.java:325)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.update(ConnectedSonarLintEngineImpl.java:169)
	at org.sonarlint.eclipse.core.internal.server.Server.updateStorage(Server.java:326)
	at org.sonarlint.eclipse.core.internal.jobs.ServerUpdateJob.run(ServerUpdateJob.java:50)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.ClassNotFoundException: org.sonar.api.batch.Sensor
	at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
	... 26 more
  • steps to reproduce
  1. Install SONAR lint
  2. In the SONAR lint bindings, click connect to SONAR qube server
  3. Give relevant details and establish connection
  4. Specify the project to be binded
  5. Error encountered
  • potential workaround :
    Not found

SonarLint throw an exception at launch (java.lang.NoClassDefFoundError: org/sonar/api/batch/Sensor)
(Janos Gyerik) #2

Thank you, we’re already aware of this issue. You can track the progress on the fix here:

https://jira.sonarsource.com/browse/SLE-290


(varun) #3

hello @janos,

Can you advise when is the fix expected to be released ? OR should i say, what is the release date of sonar lint 4.1 ?