Raj Gohel
Raj Gohel

Reputation: 3

Jenkins shows error after successful project build creating

Jenkins shows error after build successfull. I have integrated sonarQube for code analysis. I searched a lot but i not found any solution. waiting for help :)

RROR: 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.IllegalStateException: java.io.IOException: Cannot run program "svn" (in directory "C:\.jenkins\jobs\Hello\workspace"): CreateProcess error=2, The system cannot find the file specified
    at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:107)
    at org.sonar.plugins.scm.svn.SvnBlameCommand.access$000(SvnBlameCommand.java:45)
    at org.sonar.plugins.scm.svn.SvnBlameCommand$1.call(SvnBlameCommand.java:91)
    at org.sonar.plugins.scm.svn.SvnBlameCommand$1.call(SvnBlameCommand.java:88)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException: Cannot run program "svn" (in directory "C:\.jenkins\jobs\Hello\workspace"): CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    at org.sonar.api.utils.command.CommandExecutor.execute(CommandExecutor.java:76)
    at org.sonar.plugins.scm.svn.SvnBlameCommand.execute(SvnBlameCommand.java:125)
    at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:104)
    ... 8 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:189)
    at java.lang.ProcessImpl.start(ProcessImpl.java:133)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
    ... 11 more
ERROR: 
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
Build step 'Invoke Standalone SonarQube Analysis' marked build as failure
Finished: FAILURE

Upvotes: 0

Views: 657

Answers (1)

G. Ann - SonarSource Team
G. Ann - SonarSource Team

Reputation: 22804

Here's the key bit:

Cannot run program "svn"

The analysis is trying to query your SCM (apparently Subversion) for commit data on the files. It's not finding svn in $PATH to run, and that's causing analysis to fail.

Your options are to make svn available (preferable), or to configure the project on the server side to skip this part of the analysis.

If the project hasn't yet been created, you'll need to provision it. Then use the project-level Administration menu: Administration > General Settings > SCM and set Disable the SCM Sensor to true.

Upvotes: 1

Related Questions