Error in SonarLint for IntelliJ: java.lang.IllegalStateException: Unable to extract plugin dep

Environment:

  • Java: JetBrains s.r.o. 17.0.10
  • OS: Linux amd64
  • IDE: IntelliJ IDEA 2023.3.4
  • SonarLint: 10.4.0.77904

Steps to reproduce

1 - install intelliJ IDEA version and SonarLint 10.4.0.77904 extension as below

IntelliJ IDEA 2023.3.4 (Community Edition)
Build #IC-233.14475.28, built on February 13, 2024
Runtime version: 17.0.10+1-b1087.17 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.15.133.1-microsoft-standard-wsl2
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Non-Bundled Plugins:
gherkin (233.11799.165)
YourKit Java Profiler 2023.5-b229 Integration (2023.5.229.0)
cucumber-java (233.11799.196)
org.sonarlint.idea (10.4.0.77904)
Kotlin: 233.14475.28-IJ
Current Desktop: XFCE
2- Open IntealliJ IDEA
3- Confirm that SonarLint analysis works as expected on a java class (before binding to sonarqube server)
4- Bind SonarLint to sonarqube server version LTS 9.9.3
5- Restart IntelliJ IDEA
6- Try SonarLint analysis on a java class

Expected behavior

No error
SonarLint displays sonar rules with issues

Actual behavior

Error (see below the statcktrace) on IntelliJ IDEA startup.

SonarLint analysis fails and displays no sonar issues.

java.lang.IllegalStateException: Unable to extract plugin dependency: META-INF/lib/sonar-plugin-api-impl-8.9.3.48735.jar,META-INF/lib/sslr-squid-bridge-2.6.1.jar,META-INF/lib/sonar-java-plugin-6.15.1.26025.jar,META-INF/lib/java-surefire-6.15.1.26025.jar,META-INF/lib/java-checks-6.15.1.26025.jar,META-INF/lib/java-symbolic-execution-6.15.1.26025.jar,META-INF/lib/java-jsp-6.15.1.26025.jar,META-INF/lib/java-frontend-6.15.1.26025.jar,META-INF/lib/gson-2.8.6.jar,META-INF/lib/sonar-analyzer-recognizers-1.14.1.690.jar,META-INF/lib/commons-lang-2.6.jar,META-INF/lib/guava-26.0-jre.jar,META-INF/lib/slf4j-api-1.6.2.jar,META-INF/lib/javax.mail-api-1.6.2.jar,META-INF/lib/xstream-1.4.17.jar,META-INF/lib/sonar-plugin-api-8.9.3.48735.jar,META-INF/lib/commons-codec-1.14.jar,META-INF/lib/commons-io-2.8.0.jar,META-INF/lib/commons-csv-1.7.jar,META-INF/lib/picocontainer-2.14.1.jar,META-INF/lib/sslr-core-1.24.0.633.jar,META-INF/lib/sonar-regex-parsing-1.14.1.690.jar,META-INF/lib/external-reports-6.15.1.26025.jar,META-INF/lib/sonar-xml-parsing-1.14.1.690.jar,META-INF/lib/jsr305-3.0.2.jar,META-INF/lib/checker-qual-2.5.2.jar,META-INF/lib/error_prone_annotations-2.1.3.jar,META-INF/lib/j2objc-annotations-1.1.jar,META-INF/lib/animal-sniffer-annotations-1.14.jar,META-INF/lib/jdt-6.15.1.26025-shaded.jar,META-INF/lib/commons-lang3-3.12.0.jar,META-INF/lib/sonar-analyzer-commons-1.14.1.690.jar,META-INF/lib/mxparser-1.2.1.jar,META-INF/lib/org.eclipse.jdt.core-3.25.0.jar,META-INF/lib/xmlpull-1.1.3.1.jar,META-INF/lib/staxmate-2.4.0.jar,META-INF/lib/tomcat-embed-jasper-9.0.33.jar,META-INF/lib/xercesImpl-2.12.0.jar,META-INF/lib/xml-apis-1.4.01.jar,META-INF/lib/woodstox-core-5.2.0.jar,META-INF/lib/org.eclipse.core.resources-3.19.0.jar,META-INF/lib/org.eclipse.text-3.13.0.jar,META-INF/lib/org.eclipse.core.runtime-3.27.0.jar,META-INF/lib/stax2-api-4.2.1.jar,META-INF/lib/tomcat-embed-core-9.0.33.jar,META-INF/lib/tomcat-embed-el-9.0.33.jar,META-INF/lib/org.eclipse.core.jobs-3.14.0.jar,META-INF/lib/org.eclipse.core.contenttype-3.9.0.jar,META-INF/lib/org.eclipse.equinox.preferences-3.10.200.jar,META-INF/lib/org.eclipse.core.commands-3.11.0.jar,META-INF/lib/org.eclipse.equinox.common-3.18.0.jar,META-INF/lib/org.eclipse.osgi-3.18.400.jar,META-INF/lib/tomcat-annotations-api-9.0.33.jar,META-INF/lib/org.osgi.service.prefs-1.1.2.jar,META-INF/lib/osgi.annotation-8.0.1.jar
	at org.sonarsource.sonarlint.core.plugin.commons.loading.PluginInstancesLoader.extractDependencyInTempFolder(PluginInstancesLoader.java:159)
	at org.sonarsource.sonarlint.core.plugin.commons.loading.PluginInstancesLoader.defineClassloaders(PluginInstancesLoader.java:110)
	at org.sonarsource.sonarlint.core.plugin.commons.loading.PluginInstancesLoader.instantiatePluginClasses(PluginInstancesLoader.java:85)
	at org.sonarsource.sonarlint.core.plugin.commons.PluginsLoader.load(PluginsLoader.java:82)
	at org.sonarsource.sonarlint.core.client.legacy.analysis.SonarLintAnalysisEngine.restart(SonarLintAnalysisEngine.java:107)
	at org.sonarsource.sonarlint.core.client.legacy.analysis.SonarLintAnalysisEngine.<init>(SonarLintAnalysisEngine.java:90)
	at org.sonarlint.intellij.core.BackendService.createEngine(BackendService.kt:849)
	at org.sonarlint.intellij.core.SonarLintEngineFactory.configureEngine(SonarLintEngineFactory.java:75)
	at org.sonarlint.intellij.core.SonarLintEngineFactory.createEngineForConnection(SonarLintEngineFactory.java:46)
	at org.sonarlint.intellij.core.DefaultEngineManager.lambda$createConnectedEngine$2(DefaultEngineManager.java:115)
	at java.base/java.util.Optional.map(Optional.java:260)
	at org.sonarlint.intellij.core.DefaultEngineManager.createConnectedEngine(DefaultEngineManager.java:115)
	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1220)
	at org.sonarlint.intellij.core.DefaultEngineManager.getConnectedEngine(DefaultEngineManager.java:109)
	at org.sonarlint.intellij.core.DefaultEngineManager.getConnectedEngine(DefaultEngineManager.java:138)
	at org.sonarlint.intellij.core.ProjectBindingManager.getFacade(ProjectBindingManager.java:73)
	at org.sonarlint.intellij.analysis.LocalFileExclusions.filterWithServerExclusions(LocalFileExclusions.java:271)
	at org.sonarlint.intellij.analysis.LocalFileExclusions.retainNonExcludedFilesByModules(LocalFileExclusions.java:162)
	at org.sonarlint.intellij.analysis.AnalysisScope.defineFrom(AnalysisScope.java:41)
	at org.sonarlint.intellij.analysis.Analysis.doRun(Analysis.java:122)
	at org.sonarlint.intellij.analysis.Analysis.run(Analysis.java:79)
	at org.sonarlint.intellij.tasks.TaskRunnerKt$startBackgroundable$task$1.run(TaskRunner.kt:54)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:434)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:132)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:484)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:248)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:248)
	at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:498)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.nio.file.NoSuchFileException: META-INF/lib/sonar-plugin-api-impl-8.9.3.48735.jar,META-INF/lib/sslr-squid-bridge-2.6.1.jar,META-INF/lib/sonar-java-plugin-6.15.1.26025.jar,META-INF/lib/java-surefire-6.15.1.26025.jar,META-INF/lib/java-checks-6.15.1.26025.jar,META-INF/lib/java-symbolic-execution-6.15.1.26025.jar,META-INF/lib/java-jsp-6.15.1.26025.jar,META-INF/lib/java-frontend-6.15.1.26025.jar,META-INF/lib/gson-2.8.6.jar,META-INF/lib/sonar-analyzer-recognizers-1.14.1.690.jar,META-INF/lib/commons-lang-2.6.jar,META-INF/lib/guava-26.0-jre.jar,META-INF/lib/slf4j-api-1.6.2.jar,META-INF/lib/javax.mail-api-1.6.2.jar,META-INF/lib/xstream-1.4.17.jar,META-INF/lib/sonar-plugin-api-8.9.3.48735.jar,META-INF/lib/commons-codec-1.14.jar,META-INF/lib/commons-io-2.8.0.jar,META-INF/lib/commons-csv-1.7.jar,META-INF/lib/picocontainer-2.14.1.jar,META-INF/lib/sslr-core-1.24.0.633.jar,META-INF/lib/sonar-regex-parsing-1.14.1.690.jar,META-INF/lib/external-reports-6.15.1.26025.jar,META-INF/lib/sonar-xml-parsing-1.14.1.690.jar,META-INF/lib/jsr305-3.0.2.jar,META-INF/lib/checker-qual-2.5.2.jar,META-INF/lib/error_prone_annotations-2.1.3.jar,META-INF/lib/j2objc-annotations-1.1.jar,META-INF/lib/animal-sniffer-annotations-1.14.jar,META-INF/lib/jdt-6.15.1.26025-shaded.jar,META-INF/lib/commons-lang3-3.12.0.jar,META-INF/lib/sonar-analyzer-commons-1.14.1.690.jar,META-INF/lib/mxparser-1.2.1.jar,META-INF/lib/org.eclipse.jdt.core-3.25.0.jar,META-INF/lib/xmlpull-1.1.3.1.jar,META-INF/lib/staxmate-2.4.0.jar,META-INF/lib/tomcat-embed-jasper-9.0.33.jar,META-INF/lib/xercesImpl-2.12.0.jar,META-INF/lib/xml-apis-1.4.01.jar,META-INF/lib/woodstox-core-5.2.0.jar,META-INF/lib/org.eclipse.core.resources-3.19.0.jar,META-INF/lib/org.eclipse.text-3.13.0.jar,META-INF/lib/org.eclipse.core.runtime-3.27.0.jar,META-INF/lib/stax2-api-4.2.1.jar,META-INF/lib/tomcat-embed-core-9.0.33.jar,META-INF/lib/tomcat-embed-el-9.0.33.jar,META-INF/lib/org.eclipse.core.jobs-3.14.0.jar,META-INF/lib/org.eclipse.core.contenttype-3.9.0.jar,META-INF/lib/org.eclipse.equinox.preferences-3.10.200.jar,META-INF/lib/org.eclipse.core.commands-3.11.0.jar,META-INF/lib/org.eclipse.equinox.common-3.18.0.jar,META-INF/lib/org.eclipse.osgi-3.18.400.jar,META-INF/lib/tomcat-annotations-api-9.0.33.jar,META-INF/lib/org.osgi.service.prefs-1.1.2.jar,META-INF/lib/osgi.annotation-8.0.1.jar
	at jdk.zipfs/jdk.nio.zipfs.ZipPath.readAttributes(ZipPath.java:769)
	at jdk.zipfs/jdk.nio.zipfs.ZipPath.readAttributes(ZipPath.java:777)
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.readAttributes(ZipFileSystemProvider.java:276)
	at java.base/java.nio.file.Files.readAttributes(Files.java:1851)
	at java.base/java.nio.file.CopyMoveHelper.copyToForeignTarget(CopyMoveHelper.java:109)
	at java.base/java.nio.file.Files.copy(Files.java:1308)
	at org.sonarsource.sonarlint.core.plugin.commons.loading.PluginInstancesLoader.extractFile(PluginInstancesLoader.java:166)
	at org.sonarsource.sonarlint.core.plugin.commons.loading.PluginInstancesLoader.extractDependencyInTempFolder(PluginInstancesLoader.java:156)
	... 43 more

2 Likes

Hi @fcsonar and welcome to the :sonar: Community.

To investigate the issue, could you please share with us the list uf plugins enabled on your SonarQube :sonarqube: instance? You can do that eg. by sending a request to <SQ_URL>/api/plugins/installed.

Thanks!

Vojtech from :sonarlint: