Plugin probably broken by IntelliJ IDEA 2022.1.4

  • Operating system: Windows 10
  • SonarLint plugin version: 6.8.0.50884
  • SonarQube: 8.9.1 (build 44547)
  • IntelliJ IDEA: IntelliJ IDEA 2022.1.4 (Community Edition), Build #IC-221.6008.13, built on July 19, 2022

Probably due to the latest IntelliJ IDEA update the plugin doesn’t work anymore:

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.pico.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:57)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
	at org.sonarsource.sonarlint.core.plugin.commons.pico.ComponentContainer.getComponentByType(ComponentContainer.java:249)
	at org.sonarsource.sonarlint.core.analysis.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:122)
	at org.sonarsource.sonarlint.core.plugin.commons.pico.ComponentContainer.startComponents(ComponentContainer.java:119)
	at org.sonarsource.sonarlint.core.plugin.commons.pico.ComponentContainer.execute(ComponentContainer.java:104)
	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:152)
	at org.sonarsource.sonarlint.core.analysis.AnalysisEngine.executeQueuedCommands(AnalysisEngine.java:70)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonarsource.kotlin.plugin.KotlinSensor
	at org.sonarsource.sonarlint.core.plugin.commons.pico.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:57)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.parameters.CollectionComponentParameter.getArrayInstance(CollectionComponentParameter.java:334)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.parameters.CollectionComponentParameter.access$100(CollectionComponentParameter.java:49)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.parameters.CollectionComponentParameter$1.resolveInstance(CollectionComponentParameter.java:139)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:141)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
	at org.sonarsource.sonarlint.core.plugin.commons.pico.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:55)
	... 11 more
Caused by: java.lang.IllegalStateException: The field 'Max' does not exist or is not annotated with @RuleProperty in the class org.sonarsource.kotlin.checks.TooManyLinesOfCodeFileCheck
	at org.sonar.api.batch.rule.Checks.configureFields(Checks.java:170)
	at org.sonar.api.batch.rule.Checks.instantiate(Checks.java:154)
	at org.sonar.api.batch.rule.Checks.addAnnotatedChecks(Checks.java:128)
	at org.sonarsource.kotlin.plugin.KotlinSensor.<init>(KotlinSensor.kt:70)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInjector.java:145)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:342)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
	at org.sonarsource.sonarlint.core.plugin.commons.pico.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:55)
	... 27 more
2 Likes

I also had the same problem with SonarLInt plugin 6.08.0.50884, IDEA 2022.1.4 and macOS BigSur
idea-2022-1.4.-sonarlint-plugin-issue.log (14.1 KB)

I see the same issue after upgrading to the latest SonarLint plugin on IntelliJ

It seems related to the version of SonarQube: it works with SonarQube 9.4 (build 54424).
I just updated to the latest LTS, which is 8.9.9 (build 56886), and it still doesn’t work.
It’s not easy to move to the 9.* version because of the JDK 11 requirement for the scanner.

Happens for me as well after updating intelliJ and SonarLint pluging:

  • Operating system: Mac OS 12.5
  • SonarLint plugin version: 6.8.0.50884
  • SonarQube: 8.9.9 (build 56886)
  • IntelliJ IDEA: IntelliJ IDEA 2022.2 (Ultimate Edition)

Hi there,

Sorry to see many of you are affected by this issue. We are currently looking into it and we will get back to you as soon as we know more.