org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar

jenkins-ci.org | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Hi, i'm using hudson with phing and sonar for my php project from my svn. My first build project like a free style project works fine. It got sources from svn , executed phing and so phpdoc, phpcpd, pdepend, phpcs, phpunit, Running Tests, Processing JUnit file, Clover Coverage, Code Coverage. At the end, maven and sonar are launched without trouble. But i done a second build, with different source code (a zend project this time), i put pom file in my svn. On sonar option in hudson, i wrote pom racine. So when i built, i had a strange error : [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar... See log : [workspace] $ mvn -f /var/lib/hudson/jobs/MyProject/workspace/build/config/sonar/pom.xml -e -B sonar:sonar -Dsonar.host.url=http://IP:9010/ + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'sonar'. [INFO] Ignoring available plugin update: 2.0-beta-2 as it requires Maven version 3.0 [INFO] Ignoring available plugin update: 2.0-beta-1 as it requires Maven version 3.0 [INFO] ------------------------------------------------------------------------ [INFO] Building bo [INFO] task-segment: [sonar:sonar] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] [sonar:sonar {execution: default-cli}] [INFO] Sonar host: http://squeeze:9010 [INFO] Sonar version: 2.4.1 [INFO] Execute: org.codehaus.sonar:sonar-maven-plugin:2.4.1:sonar [INFO] [sonar:sonar {execution: default-sonar}] [INFO] Database dialect class org.sonar.jpa.dialect.Derby [INFO] ------------- Analyzing bo [INFO] Selected quality profile : [name=PHP_CodeSniffer rules,language=php] [INFO] Configure maven plugins... [INFO] Detection of duplication code is not supported for PHP. [INFO] Sensor PhpSourceImporter[getLanguage()=PHP,getClass()=class org.sonar.plugins.php.core.PhpSourceImporter]... [INFO] Importing files from project bo [INFO] private [INFO] tests [INFO] Sensor PhpSourceImporter[getLanguage()=PHP,getClass()=class org.sonar.plugins.php.core.PhpSourceImporter] done: 404 ms [INFO] Sensor org.sonar.plugins.php.core.NoSonarAndCommentedOutLocSensor@1c65f7... [INFO] Sensor org.sonar.plugins.php.core.NoSonarAndCommentedOutLocSensor@1c65f7 done: 66 ms [INFO] Sensor AsynchronousMeasuresSensor... [INFO] Sensor AsynchronousMeasuresSensor done: 84 ms [INFO] Sensor PhpCodesnifferSensor... [INFO] Report file for: phpcs : /var/lib/hudson/jobs/MyProject/workspace/build/logs/codesniffer.xml [INFO] Executing PHPCodeSniffer with command 'phpcs --report-file=/var/lib/hudson/jobs/MyProject/workspace/build/logs/codesniffer.xml --report=checkstyle --extensions=php,php3,php4,php5,phtml,inc /var/lib/hudson/jobs/MyProject/workspace/private' [INFO] PHPCodeSniffer ended with returned code '1'. [INFO] Report file for: phpcs : /var/lib/hudson/jobs/MyProject/workspace/build/logs/codesniffer.xml [INFO] PhpCodeSniffer report file: /var/lib/hudson/jobs/MyProject/workspace/build/logs/codesniffer.xml [INFO] No violation found in repository php_codesniffer_rules for violation PEAR.Commenting.ClassComment.InvalidAuthors [INFO] No violation found in repository php_codesniffer_rules for violation Generic.ControlStructures.InlineControlStructure.Discouraged [INFO] No violation found in repository php_codesniffer_rules for violation PEAR.WhiteSpace.ScopeIndent.Incorrect [INFO] Sensor PhpCodesnifferSensor done: 2159 ms [INFO] Sensor PHP Depend Sensor... [INFO] Report file for: pdepend : /var/lib/hudson/jobs/MyProject/workspace/build/logs/pdepend.xml [INFO] Collecting measures... [WARN] The following file doesn't belong to current project sources or tests : [INFO] Saving measures... [INFO] Sensor PHP Depend Sensor done: 308 ms [INFO] Sensor PhpUnitSensor... [INFO] Report file for: phpunit : /var/lib/hudson/jobs/MyProject/workspace/build/logs/phpunit.xml [INFO] Parsing file : [INFO] Parsing file : {0} [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103) at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79) at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: java.lang.NullPointerException at org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.parseFile(PhpUnitCoverageResultParser.java:125) at org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.parse(PhpUnitCoverageResultParser.java:95) at org.sonar.plugins.php.phpunit.PhpUnitSensor.analyse(PhpUnitSensor.java:74) at org.sonar.batch.SensorsExecutor.execute(SensorsExecutor.java:58) at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:59) at org.sonar.batch.Batch.analyzeProject(Batch.java:120) at org.sonar.batch.Batch.analyzeProjects(Batch.java:83) at org.sonar.batch.Batch.execute(Batch.java:58) at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:142) at org.sonar.maven.SonarMojo.execute(SonarMojo.java:133) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98) ... 21 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11 seconds [INFO] Finished at: Wed Jan 26 16:40:04 CET 2011 [INFO] Final Memory: 13M/47M

    Jenkins JIRA | 6 years ago | ldmichael
    org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
  2. 0

    Hi, i'm using hudson with phing and sonar for my php project from my svn. My first build project like a free style project works fine. It got sources from svn , executed phing and so phpdoc, phpcpd, pdepend, phpcs, phpunit, Running Tests, Processing JUnit file, Clover Coverage, Code Coverage. At the end, maven and sonar are launched without trouble. But i done a second build, with different source code (a zend project this time), i put pom file in my svn. On sonar option in hudson, i wrote pom racine. So when i built, i had a strange error : [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar... See log : [workspace] $ mvn -f /var/lib/hudson/jobs/MyProject/workspace/build/config/sonar/pom.xml -e -B sonar:sonar -Dsonar.host.url=http://IP:9010/ + Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'sonar'. [INFO] Ignoring available plugin update: 2.0-beta-2 as it requires Maven version 3.0 [INFO] Ignoring available plugin update: 2.0-beta-1 as it requires Maven version 3.0 [INFO] ------------------------------------------------------------------------ [INFO] Building bo [INFO] task-segment: [sonar:sonar] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] [sonar:sonar {execution: default-cli}] [INFO] Sonar host: http://squeeze:9010 [INFO] Sonar version: 2.4.1 [INFO] Execute: org.codehaus.sonar:sonar-maven-plugin:2.4.1:sonar [INFO] [sonar:sonar {execution: default-sonar}] [INFO] Database dialect class org.sonar.jpa.dialect.Derby [INFO] ------------- Analyzing bo [INFO] Selected quality profile : [name=PHP_CodeSniffer rules,language=php] [INFO] Configure maven plugins... [INFO] Detection of duplication code is not supported for PHP. [INFO] Sensor PhpSourceImporter[getLanguage()=PHP,getClass()=class org.sonar.plugins.php.core.PhpSourceImporter]... [INFO] Importing files from project bo [INFO] private [INFO] tests [INFO] Sensor PhpSourceImporter[getLanguage()=PHP,getClass()=class org.sonar.plugins.php.core.PhpSourceImporter] done: 404 ms [INFO] Sensor org.sonar.plugins.php.core.NoSonarAndCommentedOutLocSensor@1c65f7... [INFO] Sensor org.sonar.plugins.php.core.NoSonarAndCommentedOutLocSensor@1c65f7 done: 66 ms [INFO] Sensor AsynchronousMeasuresSensor... [INFO] Sensor AsynchronousMeasuresSensor done: 84 ms [INFO] Sensor PhpCodesnifferSensor... [INFO] Report file for: phpcs : /var/lib/hudson/jobs/MyProject/workspace/build/logs/codesniffer.xml [INFO] Executing PHPCodeSniffer with command 'phpcs --report-file=/var/lib/hudson/jobs/MyProject/workspace/build/logs/codesniffer.xml --report=checkstyle --extensions=php,php3,php4,php5,phtml,inc /var/lib/hudson/jobs/MyProject/workspace/private' [INFO] PHPCodeSniffer ended with returned code '1'. [INFO] Report file for: phpcs : /var/lib/hudson/jobs/MyProject/workspace/build/logs/codesniffer.xml [INFO] PhpCodeSniffer report file: /var/lib/hudson/jobs/MyProject/workspace/build/logs/codesniffer.xml [INFO] No violation found in repository php_codesniffer_rules for violation PEAR.Commenting.ClassComment.InvalidAuthors [INFO] No violation found in repository php_codesniffer_rules for violation Generic.ControlStructures.InlineControlStructure.Discouraged [INFO] No violation found in repository php_codesniffer_rules for violation PEAR.WhiteSpace.ScopeIndent.Incorrect [INFO] Sensor PhpCodesnifferSensor done: 2159 ms [INFO] Sensor PHP Depend Sensor... [INFO] Report file for: pdepend : /var/lib/hudson/jobs/MyProject/workspace/build/logs/pdepend.xml [INFO] Collecting measures... [WARN] The following file doesn't belong to current project sources or tests : [INFO] Saving measures... [INFO] Sensor PHP Depend Sensor done: 308 ms [INFO] Sensor PhpUnitSensor... [INFO] Report file for: phpunit : /var/lib/hudson/jobs/MyProject/workspace/build/logs/phpunit.xml [INFO] Parsing file : [INFO] Parsing file : {0} [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103) at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79) at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: java.lang.NullPointerException at org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.parseFile(PhpUnitCoverageResultParser.java:125) at org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.parse(PhpUnitCoverageResultParser.java:95) at org.sonar.plugins.php.phpunit.PhpUnitSensor.analyse(PhpUnitSensor.java:74) at org.sonar.batch.SensorsExecutor.execute(SensorsExecutor.java:58) at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:59) at org.sonar.batch.Batch.analyzeProject(Batch.java:120) at org.sonar.batch.Batch.analyzeProjects(Batch.java:83) at org.sonar.batch.Batch.execute(Batch.java:58) at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:142) at org.sonar.maven.SonarMojo.execute(SonarMojo.java:133) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98) ... 21 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 11 seconds [INFO] Finished at: Wed Jan 26 16:40:04 CET 2011 [INFO] Final Memory: 13M/47M

    Jenkins JIRA | 6 years ago | ldmichael
    org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.parseFile()
    2. org.sonar.plugins
      PhpUnitSensor.analyse
      1. org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.parseFile(PhpUnitCoverageResultParser.java:125)
      2. org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.parse(PhpUnitCoverageResultParser.java:95)
      3. org.sonar.plugins.php.phpunit.PhpUnitSensor.analyse(PhpUnitSensor.java:74)
      3 frames
    3. SonarQube
      Batch.execute
      1. org.sonar.batch.SensorsExecutor.execute(SensorsExecutor.java:58)
      2. org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:59)
      3. org.sonar.batch.Batch.analyzeProject(Batch.java:120)
      4. org.sonar.batch.Batch.analyzeProjects(Batch.java:83)
      5. org.sonar.batch.Batch.execute(Batch.java:58)
      5 frames
    4. org.sonar.maven
      SonarMojo.execute
      1. org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:142)
      2. org.sonar.maven.SonarMojo.execute(SonarMojo.java:133)
      2 frames
    5. Maven Plugin
      DefaultPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      1 frame
    6. org.codehaus.mojo
      SonarMojo.execute
      1. org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
      2. org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79)
      3. org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88)
      3 frames
    7. Maven Plugin
      DefaultPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      1 frame
    8. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      2. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
      3. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
      4. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      5. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
      6. org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      7. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      8. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      8 frames
    9. M3 Interceptor
      MavenCli.main
      1. org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      1 frame
    10. org.apache.maven
      CompatibleMain.main
      1. org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
      1 frame
    11. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:616)
      4 frames
    12. Plexus
      Launcher.main
      1. org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      2. org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      3. org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      4. org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      4 frames