Error loading component class

we are frequently seeing below error in our builds.

15:51:18 > Task :initSonarqube 15:51:48 > Task :sonarqube 15:52:35 > Task :sonarqube FAILED 15:52:35 15:52:35 FAILURE: Build failed with an exception. 15:52:35 15:52:35 * What went wrong: 15:52:35 Execution failed for task ‘:sonarqube’. 15:52:35 > Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer

what could cause this issue?

Hi,

Could we have the full analysis log?

 
Ann

[2022-11-02T16:15:27.787Z] INFO: Load project repositories

[2022-11-02T16:16:35.815Z] INFO: ------------------------------------------------------------------------

[2022-11-02T16:16:35.815Z] INFO: EXECUTION FAILURE

[2022-11-02T16:16:35.815Z] INFO: ------------------------------------------------------------------------

[2022-11-02T16:16:35.815Z] INFO: Total time: 1:27.815s

[2022-11-02T16:16:35.815Z] INFO: Final Memory: 20M/108M

[2022-11-02T16:16:35.815Z] INFO: ------------------------------------------------------------------------

[2022-11-02T16:16:35.815Z] ERROR: Error during SonarQube Scanner execution

[2022-11-02T16:16:35.815Z] ERROR: Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer

[2022-11-02T16:16:35.815Z] ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.filesystem.FileIndexer

[2022-11-02T16:16:35.815Z] ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.filesystem.MetadataGenerator

[2022-11-02T16:16:35.815Z] ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.filesystem.StatusDetection

[2022-11-02T16:16:35.815Z] ERROR: Caused by: Unable to load component class org.sonar.scanner.repository.CachedProjectRepositoriesSupplier

[2022-11-02T16:16:35.815Z] ERROR: Caused by: Fail to request https://sonarcloud.io/batch/project.protobuf?key=FeBuild&branch=develop

[2022-11-02T16:16:35.815Z] ERROR: Caused by: timeout

[2022-11-02T16:16:35.815Z] ERROR: Caused by: Socket closed

Hi,

Could we have the full log, starting from the analysis command?

I’m pretty sure what this is failing on is not the first call to the server…

 
Ann

@ganncamp

[2022-11-02T16:14:59.735Z] INFO: Scanner configuration file: ./sonar-scanner/conf/sonar-scanner.properties

[2022-11-02T16:14:59.735Z] INFO: Project root configuration file: ./sonar-project.properties

[2022-11-02T16:14:59.997Z] INFO: SonarQube Scanner 3.2.0.1227

[2022-11-02T16:14:59.997Z] INFO: Java 11.0.12 Alpine (64-bit)

[2022-11-02T16:14:59.997Z] INFO: Linux 3.10.0-1160.15.2.el7.x86_64 amd64

[2022-11-02T16:15:00.260Z] INFO: User cache: /home/jenkins/.sonar/cache

[2022-11-02T16:15:03.700Z] INFO: SonarQube server 8.0.0.34348

[2022-11-02T16:15:03.700Z] INFO: Default locale: "en_US", source code encoding: "UTF-8"

[2022-11-02T16:15:04.274Z] INFO: Load global settings

[2022-11-02T16:15:04.541Z] INFO: Load global settings (done) | time=235ms

[2022-11-02T16:15:04.541Z] INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu

[2022-11-02T16:15:04.541Z] INFO: User cache: /home/jenkins/.sonar/cache

[2022-11-02T16:15:04.541Z] INFO: Load/download plugins

[2022-11-02T16:15:04.541Z] INFO: Load plugins index

[2022-11-02T16:15:04.844Z] INFO: Load plugins index (done) | time=202ms

[2022-11-02T16:15:23.153Z] INFO: Load/download plugins (done) | time=16267ms

[2022-11-02T16:15:23.153Z] INFO: Loaded core extensions: developer-scanner

[2022-11-02T16:15:23.153Z] INFO: Load project settings for component key: 'SONARPROJECT'

[2022-11-02T16:15:23.153Z] INFO: Load project settings for component key: 'SONARPROJECT' (done) | time=159ms

[2022-11-02T16:15:23.153Z] INFO: Process project properties

[2022-11-02T16:15:23.153Z] INFO: Execute project builders

[2022-11-02T16:15:23.153Z] INFO: Execute project builders (done) | time=3ms

[2022-11-02T16:15:23.153Z] INFO: Project key: SONARPROJECT

[2022-11-02T16:15:23.153Z] INFO: Base dir: xxxxxxxx

[2022-11-02T16:15:23.153Z] INFO: Working dir: xxxxxxxxxxxxxxx

[2022-11-02T16:15:23.153Z] INFO: Load project branches

[2022-11-02T16:15:24.183Z] INFO: Load project branches (done) | time=1778ms

[2022-11-02T16:15:24.183Z] INFO: Check ALM binding of project 'SONARPROJECT'

[2022-11-02T16:15:24.183Z] INFO: Detected project binding: NOT_BOUND

[2022-11-02T16:15:24.183Z] INFO: Check ALM binding of project 'OXYGEN' (done) | time=145ms

[2022-11-02T16:15:24.183Z] INFO: Load project pull requests

[2022-11-02T16:15:24.799Z] INFO: Load project pull requests (done) | time=352ms

[2022-11-02T16:15:24.799Z] INFO: Load branch configuration

[2022-11-02T16:15:24.799Z] INFO: Load branch configuration (done) | time=3ms

[2022-11-02T16:15:24.799Z] INFO: Load quality profiles

[2022-11-02T16:15:25.063Z] INFO: Load quality profiles (done) | time=216ms

[2022-11-02T16:15:25.063Z] INFO: Load active rules

[2022-11-02T16:15:27.787Z] INFO: Load active rules (done) | time=2452ms

[2022-11-02T16:15:27.787Z] INFO: Organization key: coral-devops-support-bitbucket

[2022-11-02T16:15:27.787Z] INFO: Branch name: DEV-123, type: long-lived

[2022-11-02T16:15:27.787Z] INFO: Load project repositories

[2022-11-02T16:16:35.815Z] INFO: ------------------------------------------------------------------------

[2022-11-02T16:16:35.815Z] INFO: EXECUTION FAILURE

[2022-11-02T16:16:35.815Z] INFO: ------------------------------------------------------------------------

[2022-11-02T16:16:35.815Z] INFO: Total time: 1:27.815s

[2022-11-02T16:16:35.815Z] INFO: Final Memory: 20M/108M

[2022-11-02T16:16:35.815Z] INFO: ------------------------------------------------------------------------

[2022-11-02T16:16:35.815Z] ERROR: Error during SonarQube Scanner execution

[2022-11-02T16:16:35.815Z] ERROR: Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer

[2022-11-02T16:16:35.815Z] ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.filesystem.FileIndexer

[2022-11-02T16:16:35.815Z] ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.filesystem.MetadataGenerator

[2022-11-02T16:16:35.815Z] ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.filesystem.StatusDetection

[2022-11-02T16:16:35.815Z] ERROR: Caused by: Unable to load component class org.sonar.scanner.repository.CachedProjectRepositoriesSupplier

[2022-11-02T16:16:35.815Z] ERROR: Caused by: Fail to request https://sonarcloud.io/batch/project.protobuf?key=XXXXX&branch=develop

[2022-11-02T16:16:35.815Z] ERROR: Caused by: timeout

[2022-11-02T16:16:35.815Z] ERROR: Caused by: Socket closed

Hi,

You’re using a rather old version of the scanner; the current version is 4.7. Can you upgrade and try again?

And if it fails again, can we have the entire analysis log, starting with the analysis command and containing the entire stacktrace?

 
Thx,
Ann

okay we will try with new version

1 Like