Not able to bind project to-sonarqube-server-using-sonarlint-version-4-0-0-201810170711/3589

sonarlint
sonarqube

(Avishek Sarkar) #1

HI Team,

Sonarlint - 4.0.0.201810170711
Sonarqube: version 6.7.1
Eclipse - eclipse Java EE IDE for Web Developers.Version: Photon Release (4.8.0) Build id: 20180619-1200

error observed
After configuring Sonarlint with companies Sonarqube server when try to bind a project we are getting below error

An internal error occurred during: “Update SonarLint binding data from ‘sonarqube.xyz.com’”.
org/sonar/api/batch/Sensor

MESSAGE An internal error occurred during: “Update SonarLint binding data from ‘sonarqube-xyz.com’”.
!STACK 0
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.sagacify.sonar.scala.ScalaPlugin.define(ScalaPlugin.scala:33)
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:60)
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)

(upload://6DHUPIKKGaPS4TG7KpAquz6CIR0.jpeg)

Steps to reproduce:

  1. Open SonarLint Bindings tab
  2. Click “Connect to a sonarqube server”
  3. Select “Sonarqube” and click next
  4. Give your companies sonarqube server link “https://sonarqube.<your_company>.com”
  5. Give your credentials (either user name/password or token)
  6. Give a connection name
  7. Right click folders from project explorer which you like to bind and bind to sonarqube or sonarcloud

(Julien Henry) #2

Hi,

SonarSource is about to release an official Scala analyzer. We did the mistake to reuse the same plugin key than the existing community Scala plugin. So SonarLint gets confused, and try to run the community plugin even if it is not supported (uses deprecated APIs).

We finally decided to use a different key.

We have this ticket to track that: https://jira.sonarsource.com/browse/SLCORE-217
It is fixed in the codebase but we still need to release a new version of SonarLint for Eclipse. That should only occurs after Christmas holidays.

In the meantime, you can either revert to the previous SonarLint version or uninstall the Scala plugin from your SonarQube server if you are actually not using it (I know some people tend to install all available plugins from the marketplace :wink: ).


(Avishek Sarkar) #3

Unfortunately uninstall scala plugin from Sonarqube not option for me…We wanted to continue with latest Sonarlint as we have to publish the same process for all developers.

Please let us know when the new version of sonarlint will come .