IntelliJ Rider 2023.3 SonarLint Plugin

Following the update to IntelliJ Rider 2023.3 (operating environment below), the following error was kicked back on every commit attempt when SonarLint analysis was enabled:

SonarLint analysis failed: Failed to read file: C:\Users\ME\AppData\Local\JetBrains\Rider2023.3\sonarlint\storage\496e74656c6c69536372697074\projects\496e74656c6c69536372697074496e7465726e616c5f417069\analyzer_config.pb

I rebooted my computer, deleted the directory C:\Users\ME\AppData\Local\JetBrains\Rider2023.3\sonarlint, deleted C:\Users\thomas.parikka\AppData\Local\JetBrains\Rider2023.3\tmp\sonarlint, deleted C:\Users\thomas.parikka\AppData\Local\JetBrains\Rider2023.3\plugins\sonarlint-intellij.zip, uninstalled and reinstalled the SonarLint plugin and none of those helped.

What I did find that corrected the issue was to navigate to my SonarLint configuration in Rider and use the Update Local Storage button. That seemed to refresh things. Posting this here for anyone else who runs into this error.

JetBrains Rider 2023.3
Build #RD-233.11799.261, built on December 3, 2023
Runtime version: 17.0.9+7-b1087.7 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
.NET Core v7.0.10 x64 (Server GC)
SonarLint 10.1.1.77150
Windows 10 22H2
C# / .NET
Connected to SonarQube

1 Like

Hello @tparikkaatmilliman,

We are aware of this issue, and are currently working on a fix that should land around Q1 2024. Indeed the right way to make it work is to use the “Update local storage” button for now.

Thanks for reporting

1 Like

We’re experiencing issues with Rider aswell, WebStorm is working fine for us.
I’ve attached the exceptions that are occurring, is this related to this fix you’re mentioning?

Error running SonarLint analysis
java.lang.IllegalStateException: Unable to load component class org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.getComponentByType(SpringComponentContainer.java:132)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.startComponents(SpringComponentContainer.java:182)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.execute(SpringComponentContainer.java:161)
	at org.sonarsource.sonarlint.core.analysis.container.module.ModuleContainer.analyze(ModuleContainer.java:71)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:58)
	at org.sonarsource.sonarlint.core.analysis.command.AnalyzeCommand.execute(AnalyzeCommand.java:32)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine$AsyncCommand.execute(AnalysisEngine.java:153)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:71)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'PluginClassLoader(plugin=PluginDescriptor(name=SonarLint, id=org.sonarlint.idea, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\Rider2023.3\plugins\sonarlint-intellij, version=10.2.0.77238, package=null, isBundled=false), packagePrefix=null, state=active)-org.sonarsource.sonarlint.core.analysis.container.analysis.sensor.SensorsExecutor': Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ClassRealm{dbd}-com.sonarsource.A.E': Resolution of declared constructors on bean Class [com.sonarsource.A.E] from ClassLoader [ClassRealm{dbd}] failed; nested exception is java.lang.NoClassDefFoundError: org/sonar/plugins/python/api/SonarLintCache
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1284)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1245)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:494)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:349)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:342)
	at org.sonarsource.sonarlint.shaded.org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1174)
	at org.sonarsource.sonarlint.core.plugin.commons.container.SpringComponentContainer.getComponentByType(SpringComponentContainer.java:130)
	... 9 more
Caused by: org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ClassRealm{dbd}-com.sonarsource.A.E': Resolution of declared constructors on bean Class [com.sonarsource.A.E] from ClassLoader [ClassRealm{dbd}] failed; nested exception is java.lang.NoClassDefFoundError: org/sonar/plugins/python/api/SonarLintCache
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:309)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1302)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1219)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1609)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1573)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1462)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1349)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.createOptionalDependency(DefaultListableBeanFactory.java:1852)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1298)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
	... 25 more
Caused by: java.lang.NoClassDefFoundError: org/sonar/plugins/python/api/SonarLintCache
	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3373)
	at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2555)
	at org.sonarsource.sonarlint.shaded.org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:304)
	... 42 more
Caused by: java.lang.ClassNotFoundException: org.sonar.plugins.python.api.SonarLintCache
	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)
	... 46 more

Hi @StephanBis,

Your error looks quite a bit different from the original poster’s. What makes you think it’s related?

 
Thx,
Ann

The error is different, but I was wondering if it’s related to the fix that’s coming in Q1, hence my question. If it is not, then I would create a separate post for our issue.

1 Like

Hi,

Thanks for clarifying.

We won’t know without investigation. Which is best done in a new thread.

 
:smiley:
Ann