Unable to register extension org.sonar.plugins.github.PullRequestFacade

Hi all,
Has anybody ran into this error using github SonarQube plugin with PR on SonarQube version 5.6.6?
14:39:48 Aug 30, 2018 2:39:48 PM com.cisco.cstg.eet.scala.sa.ScalaPlugin getExtensions 14:39:48 INFO: In getExtensions method 14:39:48 14:39:49.012 INFO - Process project properties 14:39:49 Aug 30, 2018 2:39:49 PM com.cisco.cstg.eet.scala.sa.ScalaPlugin getExtensions 14:39:49 INFO: In getExtensions method 14:39:49 INFO: ------------------------------------------------------------------------ 14:39:49 INFO: EXECUTION FAILURE 14:39:49 INFO: ------------------------------------------------------------------------ 14:39:49 Total time: 1:04.814s 14:39:49 Final Memory: 6M/161M 14:39:49 INFO: ------------------------------------------------------------------------ 14:39:49 ERROR: Error during Sonar runner execution 14:39:49 ERROR: Unable to execute Sonar 14:39:49 ERROR: Caused by: Unable to register extension org.sonar.plugins.github.PullRequestFacade 14:39:49 ERROR: Caused by: Lorg/kohsuke/github/GHRepository; 14:39:49 ERROR: Caused by: org.kohsuke.github.GHRepository

Nitish,

The GitHub Plugin is deprecated and the most recent LTS version of SonarQube is v6.7.5. You’ll have a hard time finding good support for either that plugin or v5.6.6 of SonarQube.

That being said, can you include the parameters you’re passing to the scanner, either on the command line or in a sonar-project.properties file?

Colin

1 Like

Thanks, Colin.

What property should I add for this? I can add it

Thanks,

Nitish Goel

Nitish,

The documentation I linked for the GitHub Plugin includes an example. I would suggest studying the documentation. If you get stuck, come back with examples of what you’ve tried. :slight_smile:

Colin

1 Like

Thanks, Colin.

Sorry for late response.

From clearcase I moved to git and so have set-up a new job. But its failing with the below error, though I have kept the configuration very simple(See config below)

Not sure where it is failing from.

**20:25:26** ERROR: Caused by: Unable to load component class org.sonar.core.platform.PluginLoader **20:25:26** ERROR: Caused by: Unable to load component class org.sonar.core.platform.PluginClassloaderFactory **20:25:26** ERROR: Caused by: Unable to load component interface org.sonar.api.utils.TempFolder
sonar.projectKey=cpnr sonar.projectName=Prime Network sonar.projectVersion=9.0 sonar.branch=9.0 #sonar.verbose=true sonar.working.directory=$Workspace # path to source directories (required) sonar.sources=ddi-ng/destiny/clients

Appreciate your help.
Thanks,
Nitish Goel

Hi Nitish,

The first must-do to better understand the error in the overall context is to enable debug logs of the analysis (sonar.verbose=true), and then review overall logs and complete stacktrace. That will help you understand in which component is the error occurring (in case it’s a custom plugin) as well as potentially hint on the root-cause.

Thanks, Nico.

After enabling debug mode, i able to resolve that issue.
But I have a question. I have the source file for C code, CPP and java. All are in dame folder but subfolders are different.

There are many source files. Is there a better way instead of giving all these source files to subfolders levels?

Thanks,

Nitish Goel

:+1: Can you give more details into what the issue actually was and how you resolved it ? This information can be useful to other members of this community.

Am not sure I understand this question. FYI with Analysis Parameters as well as exclusions parameters you have full control over which source files are analyzed or not. If you have more questions on this I would suggest opening a separate topic, as it seems independent from the initial ‘Unable to register extension’ error you enquired on.

Thanks, Colin.

The issue was I was not referring to the correct src folder. It was not picking up the src files. After copying the src files from workspace to other folder and defining the working directory.

I’ll open a another case for other issue.