SonarLint for Eclipse throws errors on updating server issues


since the SonarLint update to 7.30 we’re getting errors during file analysis. From the SonarLint console:

Error while fetching and matching server issues
java.lang.NoClassDefFoundError: org/eclipse/jgit/util/StringUtils
	at org.sonarlint.eclipse.core.internal.vcs.VcsService.lambda$0(
	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(
	at org.sonarlint.eclipse.core.internal.vcs.VcsService.electBestMatchingBranch(
	at org.sonarlint.eclipse.core.internal.vcs.VcsService.getServerBranch(
	at org.sonarlint.eclipse.core.internal.tracking.ServerIssueUpdater$
Caused by: java.lang.ClassNotFoundException: org.eclipse.jgit.util.StringUtils cannot be found by org.sonarlint.eclipse.core_7.3.0.44160
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(
	at java.base/java.lang.ClassLoader.loadClass(
	... 6 more

I’ve noticed that the log output is rather new and that JGit is listed as optional dependency in the projects Manifest file.

Versions used:
Eclipse: 2021-03 (4.19)
SonarLint: 7.3.0
SonarQube: 8.9.5


Hi @oliver

Thanks for the feedback, this is a bug. For our information, what is the package of Eclipse you are using? I’m curious because I though those days all official Eclipse packages would contain eGit.

Anyway here is the ticket, we will publish a bugfix release soon:

Hi @Julien_HENRY,

thanks for the quick reply and the quick fix. Indeed, you are right, Eclipse does come with EGit bundled. However, we use a custom Eclipse package which does not bundle EGit. So we have partly ourselves to blame :wink:

Definitely not. This was in our goals to support this use case, and we let this invalid import in the way.

I have release SonarLint for Eclipse 7.3.1 that should fix your issue. Sorry for the inconvenience and thanks again for reporting.

1 Like

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