1

Hi I am getting the below error when running sonarqube analysis on the java project and trying to get the PDF report of it. The sonarqube analysis is run though Jenkins Job and the analysis runs fine but below error is displaying during PDF report generation of the analysis. Can anyone please help on this?

Using: sonarqube5.6, java8, jenkins 2.46, sonar-pdfreport-plugin-1.4

ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
    at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
    at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
    at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
    at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
    at org.sonar.runner.api.Runner.execute(Runner.java:100)
    at org.sonar.runner.Main.executeTask(Main.java:70)
    at org.sonar.runner.Main.execute(Main.java:59)
    at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.NoSuchMethodError: org.sonar.api.resources.Project.getConfiguration()Lorg/apache/commons/configuration/Configuration;
    at org.sonar.report.pdf.batch.PDFPostJob.shouldExecuteOnProject(PDFPostJob.java:57)
    at org.sonar.batch.bootstrap.BatchExtensionDictionnary.shouldKeep(BatchExtensionDictionnary.java:260)
    at org.sonar.batch.bootstrap.BatchExtensionDictionnary.getFilteredExtensions(BatchExtensionDictionnary.java:101)
    at org.sonar.batch.bootstrap.BatchExtensionDictionnary.select(BatchExtensionDictionnary.java:74)
    at org.sonar.batch.phases.PostJobsExecutor.execute(PostJobsExecutor.java:52)

Thanks. Any

Jens
  • 67,715
  • 15
  • 98
  • 113
Anurag Ghosh
  • 65
  • 1
  • 2
  • 7

1 Answers1

3

The Sonar pdfreport plugin page states, that pdfreport 1.4 is compatible with SonarQube versions 4.5.1-4.5.7.

ki92
  • 320
  • 2
  • 7
  • But below the downloadable icon, its written that, "Add support for SonarQube 4.5+" – Anurag Ghosh Jun 09 '17 at 12:53
  • Please note, that the plugin hasn't been developed for about 2 years, so it probably will not work with SonarQube versions released after. And '4.5+' doesn't mean that all the future versions will be supported, especially I'd expect some APIs to change between major versions – ki92 Jun 09 '17 at 22:07
  • Thanks for this info. Any alternate way to generate sonarqube analysis report ? so that it can be sent via email? – Anurag Ghosh Jun 10 '17 at 08:32