Exception in sbt project -> Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer

Hello,
From few days ago, my sonarqube scan process is starting to cause exceptions.
(there was no change related with scan logic)

  • project info

    • scala
    • sbt
  • versions used

    • sonar server: 8.0
  • error observed (wrap logs/code around triple quote ``` for proper formatting)

[info] SCM collecting changed files in the branch
Error:  java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer
Error:  	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)
Error:  	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
Error:  	at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:281)
Error:  	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:341)
Error:  	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
Error:  	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
Error:  	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
Error:  	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
Error:  	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
Error:  	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
Error:  	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
Error:  	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
Error:  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error:  	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Error:  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error:  	at java.lang.reflect.Method.invoke(Method.java:498)
Error:  	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
Error:  	at com.sun.proxy.$Proxy30.execute(Unknown Source)
Error:  	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
Error:  	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
Error:  	at sbtsonar.SonarPlugin$.useEmbeddedScanner(SonarPlugin.scala:253)
Error:  	at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5(SonarPlugin.scala:110)
Error:  	at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5$adapted(SonarPlugin.scala:84)
Error:  	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
Error:  	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
Error:  	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
Error:  	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
Error:  	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
Error:  	at sbt.Execute.work(Execute.scala:291)
Error:  	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
Error:  	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
Error:  	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
Error:  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Error:  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
Error:  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Error:  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Error:  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Error:  	at java.lang.Thread.run(Thread.java:748)
Error:  Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.FileIndexer
Error:  	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)
Error:  	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
Error:  	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
Error:  	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
Error:  	at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
Error:  	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
Error:  	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
Error:  	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
Error:  	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
Error:  	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
Error:  	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
Error:  	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
Error:  	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
Error:  	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
Error:  	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:63)
Error:  	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
Error:  	at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:281)
Error:  	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:341)
Error:  	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
Error:  	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
Error:  	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
Error:  	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
Error:  	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
Error:  	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:63)
Error:  	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
Error:  	at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:281)
Error:  	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:341)
Error:  	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
Error:  	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
Error:  	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
Error:  	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
Error:  	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
Error:  	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
Error:  	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
Error:  	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
Error:  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error:  	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Error:  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error:  	at java.lang.reflect.Method.invoke(Method.java:498)
Error:  	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
Error:  	at com.sun.proxy.$Proxy30.execute(Unknown Source)
Error:  	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
Error:  	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
Error:  	at sbtsonar.SonarPlugin$.useEmbeddedScanner(SonarPlugin.scala:253)
Error:  	at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5(SonarPlugin.scala:110)
Error:  	at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5$adapted(SonarPlugin.scala:84)
Error:  	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
Error:  	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
Error:  	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
Error:  	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
Error:  	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
Error:  	at sbt.Execute.work(Execute.scala:291)
Error:  	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
Error:  	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
Error:  	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
Error:  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Error:  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
Error:  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Error:  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Error:  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Error:  	at java.lang.Thread.run(Thread.java:748)
Error:  (sonarScan) java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer

Hi,

Welcome to the community!

SonarQube 8.0 is very officially past EOL with the release last week of the new LTS: 8.9. Please upgrade at your earliest convenience & try again.

 
Ann