Jenkins Pipeline is failing at sonarqube analysis stage

Hi Team,

Jenkins Pipeline is failing at sonarqube analysis stage with error “java.lang.NoSuchMethodError: ‘java.io.File org.gradle.api.tasks.testing.JUnitXmlReport.getDestination()’”

Can you please, help me with the reason of above error and steps to resolve the error? Please, find attached Jenkins pipeline debug logs for your reference.

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube:- * Data Center Edition

  • v10.6 (92116), Scanner:- SonarQube Scanner 5.0.1.3006, Plugin:- sonarqube-gradle-plugin:3.3, Gradle Version:- 8.5 and any relevant extension)

  • how is SonarQube deployed: zip, Docker, Helm

  • what are you trying to achieve:- Jenkins Pipeline is failing at sonarqube analysis stage with error “java.lang.NoSuchMethodError: ‘java.io.File org.gradle.api.tasks.testing.JUnitXmlReport.getDestination()’”

  • what have you tried so far to achieve this:- I am able to execute remaining Jenkins pipeline stages apart from Sonarqube stage.
    Sonar stage error logs.txt (1.9 MB)

Blockquote

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hi,

The current version of SonarScanner for Gradle is 5.1.0.4882. Can you upgrade and see if this is still replicable?

And while you’re upgrading The current version of SonarQube is 10.7. :wink:

 
Ann

Thanks a lot Ann for the help. The issue has been resolved after changing the sonarqube-gradle-plugin version.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.