SonarQube Scanner throws Unable to load component class org.sonar.plugins.github.PullRequestProjectBuilder

I am trying to run SonarQube scanner in Jenkins Multi-stage pipeline against a SonarQube Developer Edition 7.3.0 server. Authentication is successful but the following error is throw by sonar qube scanner.

16:44:14 [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.5.0.1254:sonar (default-cli) on project test-evergreen: Unable to load component class org.sonar.scanner.scan.ProjectLock: Unable to load component class org.sonar.scanner.scan.DefaultInputModuleHierarchy: Unable to load component class org.sonar.scanner.scan.ProjectBuildersExecutor: Unable to load component class org.sonar.plugins.github.PullRequestProjectBuilder: org.sonar.plugins.github.PullRequestProjectBuilder has unsatisfied dependency ‘class org.sonar.plugins.github.PullRequestFacade’ for constructor ‘public org.sonar.plugins.github.PullRequestProjectBuilder(org.sonar.plugins.github.GitHubPluginConfiguration,org.sonar.plugins.github.PullRequestFacade,org.sonar.api.batch.AnalysisMode)’ from org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@7d247660:240<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@7e74a380:9<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@999b951:56<| -> [Help 1]

Can somebody please help in resolving this? This was working earlier with SonarQube server 6.7.5.

Hi,

There are a whole bunch of threads on this:

https://community.sonarsource.com/search?q=unable%20to%20load%20component%20class

Can you see if any of them helps?

 
Ann

Hi,
I have checked but these thread do not point to the problem I am facing. Here are the complete logs

**09:21:32** + mvn -B sonar:sonar -Dsonar.scm.disabled=true -Dsonar.projectKey=TESTEVERGREEN-SNAPSHOT-COVERAGE-com.adobe.aemforms:test-evergreen -Dsonar.projectName=TESTEVERGREEN-SNAPSHOT-COVERAGE-test-evergreen -Dsonar.host.url=https://aemforms.cq.corp.adobe.com -Dsonar.login=**** '-Dsonar.password=****' -Dsonar.jacoco.reportPaths=target/jacoco.exec 
**09:21:33** [INFO] Scanning for projects... 
**09:21:39** [INFO] 
**09:21:39** [INFO] ------------------------------------------------------------------------ 
**09:21:39** [INFO] Building test-evergreen 1.0-SNAPSHOT 
**09:21:39** [INFO] ------------------------------------------------------------------------ 
**09:21:39** [INFO] 
**09:21:39** [INFO] --- sonar-maven-plugin:3.5.0.1254:sonar (default-cli) @ test-evergreen --- 
**09:21:39** [INFO] User cache: /home/centos/.sonar/cache 
**09:21:46** [INFO] SonarQube version: 7.3.0 
**09:21:46** [INFO] Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent) 
**09:21:46** [INFO] Publish mode 
**09:21:46** [INFO] Load global settings 
**09:21:48** [INFO] Load global settings (done) | time=2183ms 
**09:21:48** [INFO] Server id: 8E8A993D-AWXQO_JBJ5ytMHi2eeJO 
**09:21:48** [INFO] User cache: /home/centos/.sonar/cache 
**09:21:48** [INFO] Load/download plugins 
**09:21:48** [INFO] Load plugins index 
**09:21:49** [INFO] Load plugins index (done) | time=546ms 
**09:22:16** [INFO] Load/download plugins (done) | time=25879ms 
**09:22:16** [INFO] Loaded core extensions: branch-scanner 
**09:22:16** [WARNING] Unable to load colorizer: org/sonar/api/web/CodeColorizerFormat 
**09:22:16** [WARNING] Unable to load colorizer: com/github/sonarperl/colorizer/PerlCodeColorizer 
**09:22:16** [INFO] ------------------------------------------------------------------------ 
**09:22:16** [INFO] BUILD FAILURE 
**09:22:16** [INFO] ------------------------------------------------------------------------ 
**09:22:16** [INFO] Total time: 42.404 s 
**09:22:16** [INFO] Finished at: 2018-10-01T03:52:15+00:00 
**09:22:16** [INFO] Final Memory: 29M/587M 
**09:22:16** [INFO] ------------------------------------------------------------------------ 
**09:22:16** [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.5.0.1254:sonar (default-cli) on project test-evergreen: Unable to load component class org.sonar.scanner.scan.ProjectLock: Unable to load component class org.sonar.scanner.scan.DefaultInputModuleHierarchy: Unable to load component class org.sonar.scanner.scan.ProjectBuildersExecutor: Unable to load component class org.sonar.plugins.github.PullRequestProjectBuilder: org.sonar.plugins.github.PullRequestProjectBuilder has unsatisfied dependency 'class org.sonar.plugins.github.PullRequestFacade' for constructor 'public org.sonar.plugins.github.PullRequestProjectBuilder(org.sonar.plugins.github.GitHubPluginConfiguration,org.sonar.plugins.github.PullRequestFacade,org.sonar.api.batch.AnalysisMode)' from org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@5afbd567:240&lt;[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@378cfecf:9&lt;[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@da28d03:56&lt;| -&gt; [Help 1]

Can you please help in resolving this

Hi,

This error is caused by the sonar-github-plugin, that was deprecated some time ago, and stopped to be supported starting from SonarQube 7.2.
Simply remove it from your server extensions/plugins directory, and restart the server.

Hi,

Thanks for your reply. I was able to figure this out. Our platform team has upgraded the server from 6.7.5 to 7.3 Developer Edition and they had copied the old plugins. Removing the sonar-github-plugin from the UI itself resolved the issue.

Nice, thanks for the confirmation.