org.sonar.plugins.php.core.PhpPluginExecutionException: java.io.IOException: Cannot run program "pdepend.bat": CreateProcess error=2, The system cannot find the file specified

Jenkins JIRA | Amit Agarwal | 5 years ago
  1. 0

    I am trying to integrate sonar with jenkins. I have downloaded Sample Sonar (PHP Mathematics) Projects by svn co http://svn.codehaus.org/sonar-plugins/trunk/php/math-php-test. While running the application standalone (ant sonar) through sonar, it works fine but when I am integrating with jenkins I am getting exception. Please help me out to resolve this issue.. Below are the exception I get when I am building project through jenkins Started by user anonymous [workspace] $ cmd.exe /C '"C:\apache-ant-1.8.2\bin\ant.bat && exit %%ERRORLEVEL%%"' Buildfile: E:\Jenkins\jobs\PHP Mathematics\workspace\build.xml sonar: [sonar:sonar] Apache Ant(TM) version 1.8.2 compiled on December 20 2010 [sonar:sonar] Sonar Ant Task version: 1.2 [sonar:sonar] Loaded from: file:/C:/apache-ant-1.8.2/lib/sonar-ant-task-1.2.jar [sonar:sonar] Sonar work directory: E:\Jenkins\jobs\PHP Mathematics\workspace\.sonar [sonar:sonar] Sonar server: http://localhost:9000 [sonar:sonar] Sonar version: 2.11 [sonar:sonar] [INFO] Database dialect class org.sonar.jpa.dialect.Derby [sonar:sonar] [INFO] Initializing Hibernate [sonar:sonar] [INFO] ------------- Analyzing PHP Mathematics [sonar:sonar] [INFO] Selected quality profile : [name=Sonar Way,language=php] [sonar:sonar] [INFO] Configure maven plugins... [sonar:sonar] [INFO] Compare to previous analysis (2011-12-07) [sonar:sonar] [INFO] Compare over 5 days (2011-12-02, analysis of 2011-12-07 14:46:06.331) [sonar:sonar] [INFO] Compare over 30 days (2011-11-07, analysis of 2011-12-07 14:46:06.331) [sonar:sonar] [INFO] Detection of duplication code is not supported for PHP. [sonar:sonar] [INFO] Sensor PHP Source Importer... [sonar:sonar] [INFO] Sensor PHP Source Importer done: 1359 ms [sonar:sonar] [INFO] Sensor NoSonar and Commented out LOC Sensor... [sonar:sonar] [INFO] Sensor NoSonar and Commented out LOC Sensor done: 109 ms [sonar:sonar] [INFO] Sensor PHP Depend Sensor... [sonar:sonar] [INFO] Report file for: pdepend : E:\Jenkins\jobs\PHP Mathematics\workspace\.sonar\target\logs\pdepend.xml [sonar:sonar] [INFO] Executing pdepend with command 'pdepend.bat --phpunit-xml=E:\Jenkins\jobs\PHP Mathematics\workspace\.sonar\target\logs\pdepend.xml --suffix=php,php3,php4,php5,phtml,inc E:\Jenkins\jobs\PHP Mathematics\workspace\source\src' [sonar:sonar] [ERROR] Can't execute the external tool [sonar:sonar] java.io.IOException: Cannot run program "pdepend.bat": CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) [na:1.6.0_22] [sonar:sonar] at org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:111) [sonar-php-plugin-0.6.jar:na] [sonar:sonar] at org.sonar.plugins.php.phpdepend.PhpDependSensor.analyse(PhpDependSensor.java:63) [sonar-php-plugin-0.6.jar:na] [sonar:sonar] at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.phases.Phases.execute(Phases.java:93) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.Batch.execute(Batch.java:74) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.ant.Launcher.executeBatch(Launcher.java:210) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.sonar.ant.Launcher.execute(Launcher.java:66) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_22] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_22] [sonar:sonar] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_22] [sonar:sonar] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22] [sonar:sonar] at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:205) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.sonar.ant.SonarTask.execute(SonarTask.java:189) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [ant.jar:1.8.2] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_22] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_22] [sonar:sonar] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_22] [sonar:sonar] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22] [sonar:sonar] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [ant.jar:na] [sonar:sonar] at org.apache.tools.ant.Task.perform(Task.java:348) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Target.execute(Target.java:390) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Target.performTasks(Target.java:411) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Project.executeTarget(Project.java:1368) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [ant.jar:na] [sonar:sonar] at org.apache.tools.ant.Project.executeTargets(Project.java:1251) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Main.runBuild(Main.java:809) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Main.startAnt(Main.java:217) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) [ant-launcher.jar:na] [sonar:sonar] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) [ant-launcher.jar:na] [sonar:sonar] Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at java.lang.ProcessImpl.create(Native Method) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessImpl.<init>(ProcessImpl.java:81) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessImpl.start(ProcessImpl.java:30) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) [na:1.6.0_22] [sonar:sonar] ... 37 common frames omitted [sonar:sonar] [ERROR] Error occured while launching PhpDepend [sonar:sonar] org.sonar.plugins.php.core.PhpPluginExecutionException: java.io.IOException: Cannot run program "pdepend.bat": CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:125) [na:na] [sonar:sonar] at org.sonar.plugins.php.phpdepend.PhpDependSensor.analyse(PhpDependSensor.java:63) [na:na] [sonar:sonar] at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.phases.Phases.execute(Phases.java:93) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.Batch.execute(Batch.java:74) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.ant.Launcher.executeBatch(Launcher.java:210) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.sonar.ant.Launcher.execute(Launcher.java:66) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_22] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_22] [sonar:sonar] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_22] [sonar:sonar] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22] [sonar:sonar] at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:205) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.sonar.ant.SonarTask.execute(SonarTask.java:189) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [ant.jar:1.8.2] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_22] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_22] [sonar:sonar] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_22] [sonar:sonar] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22] [sonar:sonar] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [ant.jar:na] [sonar:sonar] at org.apache.tools.ant.Task.perform(Task.java:348) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Target.execute(Target.java:390) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Target.performTasks(Target.java:411) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Project.executeTarget(Project.java:1368) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [ant.jar:na] [sonar:sonar] at org.apache.tools.ant.Project.executeTargets(Project.java:1251) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Main.runBuild(Main.java:809) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Main.startAnt(Main.java:217) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) [ant-launcher.jar:na] [sonar:sonar] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) [ant-launcher.jar:na] [sonar:sonar] Caused by: java.io.IOException: Cannot run program "pdepend.bat": CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) [na:1.6.0_22] [sonar:sonar] at org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:111) [na:na] [sonar:sonar] ... 36 common frames omitted [sonar:sonar] Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at java.lang.ProcessImpl.create(Native Method) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessImpl.<init>(ProcessImpl.java:81) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessImpl.start(ProcessImpl.java:30) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) [na:1.6.0_22] [sonar:sonar] ... 37 common frames omitted [sonar:sonar] [INFO] Sensor PHP Depend Sensor done: 297 ms [sonar:sonar] [INFO] Sensor PHP Mess Detector Sensor... [sonar:sonar] [INFO] Report file for: phpmd : E:\Jenkins\jobs\PHP Mathematics\workspace\.sonar\target\logs\pmd.xml [sonar:sonar] [INFO] Executing PHPMD with command 'phpmd.bat E:\Jenkins\jobs\PHP Mathematics\workspace\source\src xml E:\Jenkins\jobs\PHP Mathematics\workspace\.sonar\target\logs\ruleset1266231422713415981.xml --reportfile E:\Jenkins\jobs\PHP Mathematics\workspace\.sonar\target\logs\pmd.xml --suffixes php,php3,php4,php5,phtml,inc' [sonar:sonar] [ERROR] Can't execute the external tool [sonar:sonar] java.io.IOException: Cannot run program "phpmd.bat": CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) [na:1.6.0_22] [sonar:sonar] at org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:111) [sonar-php-plugin-0.6.jar:na] [sonar:sonar] at org.sonar.plugins.php.pmd.PhpmdSensor.analyse(PhpmdSensor.java:74) [sonar-php-plugin-0.6.jar:na] [sonar:sonar] at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.phases.Phases.execute(Phases.java:93) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.Batch.execute(Batch.java:74) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.ant.Launcher.executeBatch(Launcher.java:210) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.sonar.ant.Launcher.execute(Launcher.java:66) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_22] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_22] [sonar:sonar] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_22] [sonar:sonar] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22] [sonar:sonar] at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:205) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.sonar.ant.SonarTask.execute(SonarTask.java:189) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [ant.jar:1.8.2] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_22] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_22] [sonar:sonar] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_22] [sonar:sonar] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22] [sonar:sonar] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [ant.jar:na] [sonar:sonar] at org.apache.tools.ant.Task.perform(Task.java:348) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Target.execute(Target.java:390) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Target.performTasks(Target.java:411) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Project.executeTarget(Project.java:1368) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [ant.jar:na] [sonar:sonar] at org.apache.tools.ant.Project.executeTargets(Project.java:1251) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Main.runBuild(Main.java:809) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Main.startAnt(Main.java:217) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) [ant-launcher.jar:na] [sonar:sonar] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) [ant-launcher.jar:na] [sonar:sonar] Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at java.lang.ProcessImpl.create(Native Method) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessImpl.<init>(ProcessImpl.java:81) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessImpl.start(ProcessImpl.java:30) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) [na:1.6.0_22] [sonar:sonar] ... 37 common frames omitted BUILD FAILED E:\Jenkins\jobs\PHP Mathematics\workspace\build.xml:35: org.sonar.plugins.php.core.PhpPluginExecutionException: java.io.IOException: Cannot run program "phpmd.bat": CreateProcess error=2, The system cannot find the file specified at org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:125) at org.sonar.plugins.php.pmd.PhpmdSensor.analyse(PhpmdSensor.java:74) at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64) at org.sonar.batch.phases.Phases.execute(Phases.java:93) at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) at org.sonar.batch.bootstrap.Module.start(Module.java:89) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110) at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100) at org.sonar.batch.bootstrap.Module.start(Module.java:89) at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96) at org.sonar.batch.bootstrap.Module.start(Module.java:89) at org.sonar.batch.Batch.execute(Batch.java:74) at org.sonar.ant.Launcher.executeBatch(Launcher.java:210) at org.sonar.ant.Launcher.execute(Launcher.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:205) at org.sonar.ant.SonarTask.execute(SonarTask.java:189) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.Main.runBuild(Main.java:809) at org.apache.tools.ant.Main.startAnt(Main.java:217) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) Caused by: java.io.IOException: Cannot run program "phpmd.bat": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:111) ... 36 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:81) at java.lang.ProcessImpl.start(ProcessImpl.java:30) at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) ... 37 more Total time: 51 seconds Build step 'Invoke Ant' marked build as failure Skipping sonar analysis due to bad build status FAILURE Finished: FAILURE

    Jenkins JIRA | 5 years ago | Amit Agarwal
    org.sonar.plugins.php.core.PhpPluginExecutionException: java.io.IOException: Cannot run program "pdepend.bat": CreateProcess error=2, The system cannot find the file specified
  2. 0

    [JENKINS-12024] Exception while enabling Sonar from jenkins - Jenkins JIRA

    jenkins-ci.org | 7 months ago
    org.sonar.plugins.php.core.PhpPluginExecutionException: java.io.IOException: Cannot run program "pdepend.bat": CreateProcess error=2, The system cannot find the file specified
  3. 0

    I am trying to integrate sonar with jenkins. I have downloaded Sample Sonar (PHP Mathematics) Projects by svn co http://svn.codehaus.org/sonar-plugins/trunk/php/math-php-test. While running the application standalone (ant sonar) through sonar, it works fine but when I am integrating with jenkins I am getting exception. Please help me out to resolve this issue.. Below are the exception I get when I am building project through jenkins Started by user anonymous [workspace] $ cmd.exe /C '"C:\apache-ant-1.8.2\bin\ant.bat && exit %%ERRORLEVEL%%"' Buildfile: E:\Jenkins\jobs\PHP Mathematics\workspace\build.xml sonar: [sonar:sonar] Apache Ant(TM) version 1.8.2 compiled on December 20 2010 [sonar:sonar] Sonar Ant Task version: 1.2 [sonar:sonar] Loaded from: file:/C:/apache-ant-1.8.2/lib/sonar-ant-task-1.2.jar [sonar:sonar] Sonar work directory: E:\Jenkins\jobs\PHP Mathematics\workspace\.sonar [sonar:sonar] Sonar server: http://localhost:9000 [sonar:sonar] Sonar version: 2.11 [sonar:sonar] [INFO] Database dialect class org.sonar.jpa.dialect.Derby [sonar:sonar] [INFO] Initializing Hibernate [sonar:sonar] [INFO] ------------- Analyzing PHP Mathematics [sonar:sonar] [INFO] Selected quality profile : [name=Sonar Way,language=php] [sonar:sonar] [INFO] Configure maven plugins... [sonar:sonar] [INFO] Compare to previous analysis (2011-12-07) [sonar:sonar] [INFO] Compare over 5 days (2011-12-02, analysis of 2011-12-07 14:46:06.331) [sonar:sonar] [INFO] Compare over 30 days (2011-11-07, analysis of 2011-12-07 14:46:06.331) [sonar:sonar] [INFO] Detection of duplication code is not supported for PHP. [sonar:sonar] [INFO] Sensor PHP Source Importer... [sonar:sonar] [INFO] Sensor PHP Source Importer done: 1359 ms [sonar:sonar] [INFO] Sensor NoSonar and Commented out LOC Sensor... [sonar:sonar] [INFO] Sensor NoSonar and Commented out LOC Sensor done: 109 ms [sonar:sonar] [INFO] Sensor PHP Depend Sensor... [sonar:sonar] [INFO] Report file for: pdepend : E:\Jenkins\jobs\PHP Mathematics\workspace\.sonar\target\logs\pdepend.xml [sonar:sonar] [INFO] Executing pdepend with command 'pdepend.bat --phpunit-xml=E:\Jenkins\jobs\PHP Mathematics\workspace\.sonar\target\logs\pdepend.xml --suffix=php,php3,php4,php5,phtml,inc E:\Jenkins\jobs\PHP Mathematics\workspace\source\src' [sonar:sonar] [ERROR] Can't execute the external tool [sonar:sonar] java.io.IOException: Cannot run program "pdepend.bat": CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) [na:1.6.0_22] [sonar:sonar] at org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:111) [sonar-php-plugin-0.6.jar:na] [sonar:sonar] at org.sonar.plugins.php.phpdepend.PhpDependSensor.analyse(PhpDependSensor.java:63) [sonar-php-plugin-0.6.jar:na] [sonar:sonar] at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.phases.Phases.execute(Phases.java:93) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.Batch.execute(Batch.java:74) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.ant.Launcher.executeBatch(Launcher.java:210) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.sonar.ant.Launcher.execute(Launcher.java:66) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_22] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_22] [sonar:sonar] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_22] [sonar:sonar] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22] [sonar:sonar] at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:205) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.sonar.ant.SonarTask.execute(SonarTask.java:189) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [ant.jar:1.8.2] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_22] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_22] [sonar:sonar] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_22] [sonar:sonar] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22] [sonar:sonar] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [ant.jar:na] [sonar:sonar] at org.apache.tools.ant.Task.perform(Task.java:348) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Target.execute(Target.java:390) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Target.performTasks(Target.java:411) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Project.executeTarget(Project.java:1368) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [ant.jar:na] [sonar:sonar] at org.apache.tools.ant.Project.executeTargets(Project.java:1251) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Main.runBuild(Main.java:809) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Main.startAnt(Main.java:217) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) [ant-launcher.jar:na] [sonar:sonar] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) [ant-launcher.jar:na] [sonar:sonar] Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at java.lang.ProcessImpl.create(Native Method) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessImpl.<init>(ProcessImpl.java:81) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessImpl.start(ProcessImpl.java:30) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) [na:1.6.0_22] [sonar:sonar] ... 37 common frames omitted [sonar:sonar] [ERROR] Error occured while launching PhpDepend [sonar:sonar] org.sonar.plugins.php.core.PhpPluginExecutionException: java.io.IOException: Cannot run program "pdepend.bat": CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:125) [na:na] [sonar:sonar] at org.sonar.plugins.php.phpdepend.PhpDependSensor.analyse(PhpDependSensor.java:63) [na:na] [sonar:sonar] at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.phases.Phases.execute(Phases.java:93) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.Batch.execute(Batch.java:74) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.ant.Launcher.executeBatch(Launcher.java:210) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.sonar.ant.Launcher.execute(Launcher.java:66) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_22] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_22] [sonar:sonar] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_22] [sonar:sonar] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22] [sonar:sonar] at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:205) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.sonar.ant.SonarTask.execute(SonarTask.java:189) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [ant.jar:1.8.2] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_22] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_22] [sonar:sonar] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_22] [sonar:sonar] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22] [sonar:sonar] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [ant.jar:na] [sonar:sonar] at org.apache.tools.ant.Task.perform(Task.java:348) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Target.execute(Target.java:390) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Target.performTasks(Target.java:411) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Project.executeTarget(Project.java:1368) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [ant.jar:na] [sonar:sonar] at org.apache.tools.ant.Project.executeTargets(Project.java:1251) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Main.runBuild(Main.java:809) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Main.startAnt(Main.java:217) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) [ant-launcher.jar:na] [sonar:sonar] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) [ant-launcher.jar:na] [sonar:sonar] Caused by: java.io.IOException: Cannot run program "pdepend.bat": CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) [na:1.6.0_22] [sonar:sonar] at org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:111) [na:na] [sonar:sonar] ... 36 common frames omitted [sonar:sonar] Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at java.lang.ProcessImpl.create(Native Method) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessImpl.<init>(ProcessImpl.java:81) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessImpl.start(ProcessImpl.java:30) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) [na:1.6.0_22] [sonar:sonar] ... 37 common frames omitted [sonar:sonar] [INFO] Sensor PHP Depend Sensor done: 297 ms [sonar:sonar] [INFO] Sensor PHP Mess Detector Sensor... [sonar:sonar] [INFO] Report file for: phpmd : E:\Jenkins\jobs\PHP Mathematics\workspace\.sonar\target\logs\pmd.xml [sonar:sonar] [INFO] Executing PHPMD with command 'phpmd.bat E:\Jenkins\jobs\PHP Mathematics\workspace\source\src xml E:\Jenkins\jobs\PHP Mathematics\workspace\.sonar\target\logs\ruleset1266231422713415981.xml --reportfile E:\Jenkins\jobs\PHP Mathematics\workspace\.sonar\target\logs\pmd.xml --suffixes php,php3,php4,php5,phtml,inc' [sonar:sonar] [ERROR] Can't execute the external tool [sonar:sonar] java.io.IOException: Cannot run program "phpmd.bat": CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) [na:1.6.0_22] [sonar:sonar] at org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:111) [sonar-php-plugin-0.6.jar:na] [sonar:sonar] at org.sonar.plugins.php.pmd.PhpmdSensor.analyse(PhpmdSensor.java:74) [sonar-php-plugin-0.6.jar:na] [sonar:sonar] at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.phases.Phases.execute(Phases.java:93) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.bootstrap.Module.start(Module.java:89) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.batch.Batch.execute(Batch.java:74) [sonar-batch-2.11.jar:na] [sonar:sonar] at org.sonar.ant.Launcher.executeBatch(Launcher.java:210) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.sonar.ant.Launcher.execute(Launcher.java:66) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_22] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_22] [sonar:sonar] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_22] [sonar:sonar] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22] [sonar:sonar] at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:205) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.sonar.ant.SonarTask.execute(SonarTask.java:189) [sonar-ant-task-1.2.jar:na] [sonar:sonar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [ant.jar:1.8.2] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.6.0_22] [sonar:sonar] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [na:1.6.0_22] [sonar:sonar] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [na:1.6.0_22] [sonar:sonar] at java.lang.reflect.Method.invoke(Method.java:597) [na:1.6.0_22] [sonar:sonar] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [ant.jar:na] [sonar:sonar] at org.apache.tools.ant.Task.perform(Task.java:348) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Target.execute(Target.java:390) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Target.performTasks(Target.java:411) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Project.executeTarget(Project.java:1368) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [ant.jar:na] [sonar:sonar] at org.apache.tools.ant.Project.executeTargets(Project.java:1251) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Main.runBuild(Main.java:809) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.Main.startAnt(Main.java:217) [ant.jar:1.8.2] [sonar:sonar] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) [ant-launcher.jar:na] [sonar:sonar] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) [ant-launcher.jar:na] [sonar:sonar] Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified [sonar:sonar] at java.lang.ProcessImpl.create(Native Method) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessImpl.<init>(ProcessImpl.java:81) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessImpl.start(ProcessImpl.java:30) [na:1.6.0_22] [sonar:sonar] at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) [na:1.6.0_22] [sonar:sonar] ... 37 common frames omitted BUILD FAILED E:\Jenkins\jobs\PHP Mathematics\workspace\build.xml:35: org.sonar.plugins.php.core.PhpPluginExecutionException: java.io.IOException: Cannot run program "phpmd.bat": CreateProcess error=2, The system cannot find the file specified at org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:125) at org.sonar.plugins.php.pmd.PhpmdSensor.analyse(PhpmdSensor.java:74) at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64) at org.sonar.batch.phases.Phases.execute(Phases.java:93) at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) at org.sonar.batch.bootstrap.Module.start(Module.java:89) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110) at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100) at org.sonar.batch.bootstrap.Module.start(Module.java:89) at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96) at org.sonar.batch.bootstrap.Module.start(Module.java:89) at org.sonar.batch.Batch.execute(Batch.java:74) at org.sonar.ant.Launcher.executeBatch(Launcher.java:210) at org.sonar.ant.Launcher.execute(Launcher.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:205) at org.sonar.ant.SonarTask.execute(SonarTask.java:189) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.Main.runBuild(Main.java:809) at org.apache.tools.ant.Main.startAnt(Main.java:217) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) Caused by: java.io.IOException: Cannot run program "phpmd.bat": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:111) ... 36 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:81) at java.lang.ProcessImpl.start(ProcessImpl.java:30) at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) ... 37 more Total time: 51 seconds Build step 'Invoke Ant' marked build as failure Skipping sonar analysis due to bad build status FAILURE Finished: FAILURE

    Jenkins JIRA | 5 years ago | Amit Agarwal
    org.sonar.plugins.php.core.PhpPluginExecutionException: java.io.IOException: Cannot run program "pdepend.bat": CreateProcess error=2, The system cannot find the file specified
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hadoop Streaming in .NET

    Stack Overflow | 6 years ago | Ali
    java.io.IOException: CreateProcess error=2, The system cannot find the file specified
  6. 0

    JavaSVN library mailing list

    gmane.org | 1 year ago
    java.lang.RuntimeException: java.io.IOException: Cannot run program "svn" (in directory "E:\asf\svnkit\trunk\svnkit\.tests\RevertTest.testUnmodifiedFileIsUntouchedPreserveModifiedOption\wc"): CreateProcess error=2, The system cannot find the file specified

  1. eti22 1 times, last 1 month ago
  2. asdasd 24 times, last 3 months ago
  3. rexgreenza 8 times, last 3 months ago
  4. Benj-AD 1 times, last 4 months ago
  5. Akshay 4 times, last 6 months ago
95 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.IOException

    CreateProcess error=2, The system cannot find the file specified

    at java.lang.ProcessImpl.create()
  2. Java RT
    ProcessBuilder.start
    1. java.lang.ProcessImpl.create(Native Method)[na:1.6.0_22]
    2. java.lang.ProcessImpl.<init>(ProcessImpl.java:81)[na:1.6.0_22]
    3. java.lang.ProcessImpl.start(ProcessImpl.java:30)[na:1.6.0_22]
    4. java.lang.ProcessBuilder.start(ProcessBuilder.java:453)[na:1.6.0_22]
    4 frames
  3. org.sonar.plugins
    PhpDependSensor.analyse
    1. org.sonar.plugins.php.core.AbstractPhpExecutor.execute(AbstractPhpExecutor.java:111)[na:na]
    2. org.sonar.plugins.php.phpdepend.PhpDependSensor.analyse(PhpDependSensor.java:63)[na:na]
    2 frames
  4. SonarQube
    Batch.execute
    1. org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)[sonar-batch-2.11.jar:na]
    2. org.sonar.batch.phases.Phases.execute(Phases.java:93)[sonar-batch-2.11.jar:na]
    3. org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)[sonar-batch-2.11.jar:na]
    4. org.sonar.batch.bootstrap.Module.start(Module.java:89)[sonar-batch-2.11.jar:na]
    5. org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110)[sonar-batch-2.11.jar:na]
    6. org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100)[sonar-batch-2.11.jar:na]
    7. org.sonar.batch.bootstrap.Module.start(Module.java:89)[sonar-batch-2.11.jar:na]
    8. org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96)[sonar-batch-2.11.jar:na]
    9. org.sonar.batch.bootstrap.Module.start(Module.java:89)[sonar-batch-2.11.jar:na]
    10. org.sonar.batch.Batch.execute(Batch.java:74)[sonar-batch-2.11.jar:na]
    10 frames
  5. Sonar Ant Task
    Launcher.execute
    1. org.sonar.ant.Launcher.executeBatch(Launcher.java:210)[sonar-ant-task-1.2.jar:na]
    2. org.sonar.ant.Launcher.execute(Launcher.java:66)[sonar-ant-task-1.2.jar:na]
    2 frames
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_22]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_22]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_22]
    4. java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_22]
    4 frames
  7. Sonar Ant Task
    SonarTask.execute
    1. org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:205)[sonar-ant-task-1.2.jar:na]
    2. org.sonar.ant.SonarTask.execute(SonarTask.java:189)[sonar-ant-task-1.2.jar:na]
    2 frames
  8. Ant
    UnknownElement.execute
    1. org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)[ant.jar:1.8.2]
    1 frame
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_22]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_22]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_22]
    4. java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_22]
    4 frames
  10. Ant
    Main.startAnt
    1. org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)[ant.jar:na]
    2. org.apache.tools.ant.Task.perform(Task.java:348)[ant.jar:1.8.2]
    3. org.apache.tools.ant.Target.execute(Target.java:390)[ant.jar:1.8.2]
    4. org.apache.tools.ant.Target.performTasks(Target.java:411)[ant.jar:1.8.2]
    5. org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)[ant.jar:1.8.2]
    6. org.apache.tools.ant.Project.executeTarget(Project.java:1368)[ant.jar:1.8.2]
    7. org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)[ant.jar:na]
    8. org.apache.tools.ant.Project.executeTargets(Project.java:1251)[ant.jar:1.8.2]
    9. org.apache.tools.ant.Main.runBuild(Main.java:809)[ant.jar:1.8.2]
    10. org.apache.tools.ant.Main.startAnt(Main.java:217)[ant.jar:1.8.2]
    10 frames
  11. Apache Ant Launcher
    Launcher.main
    1. org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)[ant-launcher.jar:na]
    2. org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)[ant-launcher.jar:na]
    2 frames