Sonarlint integration fails with Intellij

I am trying to install SonarLint offline in Intellij. Installation was successful and I was able to see SonarLint dialog box in Intellij

. Below are the software versions which I am using.

  1. Intellij version: IntelliJ IDEA 2019.3.2 (Community Edition)
  2. SonarLint version: sonarlint-intellij-4.14.2.28348
  3. Java version: openjdk version “11.0.4” 2019-07-16 LTS
  4. SonarQube version: 8.6 community edition

However, after installation I tried to run the code analysis but I am getting below exception

java.lang.NoClassDefFoundError: org/sonarsource/sonarlint/core/client/api/common/FileExclusions
at org.sonarlint.intellij.analysis.LocalFileExclusions.loadGlobalExclusions(LocalFileExclusions.java:90)
at org.sonarlint.intellij.analysis.LocalFileExclusions.(LocalFileExclusions.java:65)
at org.sonarlint.intellij.ui.AutoTriggerStatusPanel.(AutoTriggerStatusPanel.java:75)
at org.sonarlint.intellij.ui.SonarLintIssuesPanel.(SonarLintIssuesPanel.java:55)
at org.sonarlint.intellij.ui.SonarLintToolWindowFactory.addIssuesTab(SonarLintToolWindowFactory.java:67)
at org.sonarlint.intellij.ui.SonarLintToolWindowFactory.createToolWindowContent(SonarLintToolWindowFactory.java:51)
at com.intellij.openapi.wm.impl.ToolWindowImpl.ensureContentInitialized(ToolWindowImpl.java:534)
at com.intellij.openapi.wm.impl.ToolWindowImpl.getContentManager(ToolWindowImpl.java:358)
at com.intellij.openapi.wm.impl.content.ContentTabLabel.contentManager(ContentTabLabel.java:356)
at com.intellij.openapi.wm.impl.content.ContentTabLabel.isSelected(ContentTabLabel.java:339)
at com.intellij.openapi.wm.impl.content.ContentTabLabel._getGraphics(ContentTabLabel.java:348)
at com.intellij.openapi.wm.impl.content.BaseLabel.paintComponent(BaseLabel.java:78)
at com.intellij.openapi.wm.impl.content.ContentTabLabel.paintComponent(ContentTabLabel.java:334)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1074)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at com.intellij.openapi.wm.impl.content.ToolWindowContentUi.paintChildren(ToolWindowContentUi.java:262)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at com.intellij.openapi.wm.impl.ToolWindowHeader.paintChildren(ToolWindowHeader.java:249)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JLayeredPane.paint(JLayeredPane.java:590)
at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:907)
at java.desktop/javax.swing.JComponent.paint(JComponent.java:1083)
at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5255)
at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedImpl(RepaintManager.java:1654)
at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1629)
at java.desktop/javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1566)
at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1333)
at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5203)
at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5013)
at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:868)
at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:851)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:851)
at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:826)
at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:775)
at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1901)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:781)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Please advise

Hello,

It looks like your installation is somehow corrupted. Could you try to uninstall the plugin, re-download it and re-install it please ? And also make sure you restart your IDE after re-installation

I have tried 3 to 4 times reinstalling and also with different version of plugin but still same error.

Tried with different Version installed:
sonarlint-intellij-4.14.2.28348
sonarlint-intellij-4.14.1.27745
sonarlint-intellij-4.13.0.24781

I have also uninstalled the plugin, restarted my IDE and reinstalled the plugin but it didnt work.

Hello Vilas.
Did your problem solved or you still have this error?
If it’s still there, is it possible for you to upload the file you use to install? I would like to test it on my instance of IDEA.

Hi Kirill,

Yes, my issue is resolved, actually I was uploading sonarlint-intellij.jar file instead of entire zip file.

Thanks for your concern

Vilas

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