嗨,我在Java项目上运行声纳分析并尝试获取其PDF报告时遇到以下错误。通过Jenkins Job运行声纳分析,并且分析运行良好,但在生成PDF报告的过程中显示以下错误。有人可以帮忙吗?

使用: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)


谢谢。
任何

最佳答案

Sonar pdfreport plugin page指出pdfreport 1.4与SonarQube 4.5.1-4.5.7版本兼容。

关于java - java.lang.NoSuchMethodError:org.sonar.api.resources.Project.getConfiguration()Lorg/apache/commons/configuration/Configuration,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44457522/

10-10 03:13