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

Jenkins JIRA | Michael Rumpf | 6 years 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

    sonar / maven context: Gallio execution failed. Searching why:?

    Stack Overflow | 5 years ago | Vinzz
    org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
  2. 0

    The Sonar plugin fails with some of my projects: {code} 16:05:30 [abp] $ /export/build/hudson-slave/tools/maven_2.2.1/bin/mvn -f ABP_ams-build/build/sonar/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://HOSTNAME:3306/sonar ******** ******** -Dsonar.host.url=http://HOSTNAME:8080/sonar 16:05:31 + Error stacktraces are turned on. 16:05:33 [INFO] Scanning for projects... 16:05:33 [INFO] Searching repository for plugin with prefix: 'sonar'. 16:05:34 [INFO] ------------------------------------------------------------------------ 16:05:34 [INFO] Building abp 16:05:34 [INFO] task-segment: [sonar:sonar] (aggregator-style) 16:05:34 [INFO] ------------------------------------------------------------------------ 16:05:34 [INFO] [sonar:sonar {execution: default-cli}] 16:05:34 [INFO] Sonar host: http://HOSTNAME:8080/sonar 16:05:34 [INFO] Sonar version: 2.3 16:05:34 [WARNING] Component returned which is not the same manager. Ignored. component=org.apache.maven.profiles.activation.JdkPrefixProfileActivator@448e448e .... 16:05:36 [WARNING] Component returned which is not the same manager. Ignored. component=org.apache.maven.profiles.activation.JdkPrefixProfileActivator@448e448e 16:05:39 [INFO] [sonar-core:internal {execution: default-internal}] 16:05:40 [INFO] Database dialect class org.sonar.jpa.dialect.MySql 16:05:42 [INFO] ------------- Analyzing abp trunk 16:05:44 [INFO] Selected quality profile : [name=literal requirements,language=java] 16:05:44 [INFO] Configure maven plugins... 16:05:46 [INFO] Sensor SquidSensor... 16:05:47 [INFO] Java AST scan... 16:05:47 [INFO] ------------------------------------------------------------------------ 16:05:47 [ERROR] BUILD ERROR 16:05:47 [INFO] ------------------------------------------------------------------------ 16:05:47 [INFO] Can not execute Sonar 16:05:47 16:05:47 Embedded error: Got an exception - null, file : /export/build/hudson-slave/workspace/abp/abp/ABP_ams-build/build/sonar/source/com/dcx/abpneu/sfw/mail/SendMailCommand.java, line : 0 16:05:47 [INFO] ------------------------------------------------------------------------ 16:05:47 [INFO] Trace 16:05:47 org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) 16:05:47 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) 16:05:47 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) 16:05:47 at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) 16:05:47 at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) 16:05:47 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 16:05:47 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) 16:05:47 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16:05:47 at java.lang.reflect.Method.invoke(Method.java:618) 16:05:47 at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) 16:05:47 at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) 16:05:47 at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) 16:05:47 at org.codehaus.classworlds.Launcher.main(Launcher.java:375) 16:05:47 Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar 16:05:47 at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:87) 16:05:47 at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65) 16:05:47 at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117) 16:05:47 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) 16:05:47 ... 17 more 16:05:47 Caused by: org.sonar.squid.api.AnalysisException: Got an exception - null, file : /export/build/hudson-slave/workspace/abp/abp/ABP_ams-build/build/sonar/source/com/dcx/abpneu/sfw/mail/SendMailCommand.java, line : 0 16:05:47 at org.sonar.java.ast.CheckstyleAuditListener.addError(CheckstyleAuditListener.java:40) 16:05:47 at com.puppycrawl.tools.checkstyle.Checker.fireErrors(Checker.java:513) 16:05:47 at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:279) 16:05:47 at org.sonar.java.ast.JavaAstScanner.launchCheckstyleEngine(JavaAstScanner.java:93) 16:05:47 at org.sonar.java.ast.JavaAstScanner.scanFiles(JavaAstScanner.java:156) 16:05:47 at org.sonar.plugins.squid.SquidExecutor.scanSources(SquidExecutor.java:136) 16:05:47 at org.sonar.plugins.squid.SquidExecutor.scan(SquidExecutor.java:83) 16:05:47 at org.sonar.plugins.squid.SquidSensor.analyse(SquidSensor.java:81) 16:05:47 at org.sonar.batch.SensorsExecutor.execute(SensorsExecutor.java:58) 16:05:47 at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:59) 16:05:47 at org.sonar.batch.Batch.analyzeProject(Batch.java:113) 16:05:47 at org.sonar.batch.Batch.analyzeProjects(Batch.java:82) 16:05:47 at org.sonar.batch.Batch.execute(Batch.java:57) 16:05:47 at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:142) 16:05:47 at org.sonar.maven2.BatchMojo.execute(BatchMojo.java:133) 16:05:47 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) 16:05:47 at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82) 16:05:47 ... 21 more 16:05:47 [INFO] ------------------------------------------------------------------------ 16:05:47 [INFO] Total time: 14 seconds 16:05:47 [INFO] Finished at: Sat Oct 30 16:05:51 CEST 2010 16:05:47 [INFO] Final Memory: 16M/48M 16:05:47 [INFO] ------------------------------------------------------------------------ 16:05:48 Finished: FAILURE {code} It seems as if there is a problem with Checkstyle. Therefore I ran Checkstyle manually with the same configuration file: {code} <file name="C:\work\workspaces\abp\ServerFramework\ejbModule\com\dcx\abpneu\sfw\mail\SendMailCommand.java"> <error line="0" severity="error" message="Folgende Ausnahme ist aufgetreten - java.lang.RuntimeException: Kann zum Tag &apos;InvalidMailAddressException&apos; keine Klasseninformation zu @throws laden." source="com.puppycrawl.tools.checkstyle.TreeWalker"/> <error line="9" severity="error" message="Die Form &apos;.*&apos; für import-Anweisungen sollte vermieden werden - com.dcx.abpneu.sfw.exceptions.*." source="com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck"/> <error line="26" column="1" severity="error" message="File contains tab characters (this is the first instance)." source="com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck"/> <error line="35" column="28" severity="error" message="Variable &apos;senderInfo&apos; muss private sein." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/> <error line="40" column="26" severity="error" message="Variable &apos;subject&apos; muss private sein." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/> <error line="45" column="26" severity="error" message="Variable &apos;mailText&apos; muss private sein." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/> <error line="50" column="30" severity="error" message="Variable &apos;recipientInfo&apos; muss private sein." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/> <error line="199" severity="error" message="Zeile länger als 120 Zeichen" source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/> <error line="212" severity="error" message="Zeile länger als 120 Zeichen" source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/> <error line="225" severity="error" message="Zeile länger als 120 Zeichen" source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/> <error line="238" severity="error" message="Zeile länger als 120 Zeichen" source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/> <error line="251" severity="error" message="Zeile länger als 120 Zeichen" source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/> <error line="264" severity="error" message="Zeile länger als 120 Zeichen" source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/> </file> {code}

    Jenkins JIRA | 6 years ago | Michael Rumpf
    org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
  3. 0

    The Sonar plugin fails with some of my projects: {code} 16:05:30 [abp] $ /export/build/hudson-slave/tools/maven_2.2.1/bin/mvn -f ABP_ams-build/build/sonar/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://HOSTNAME:3306/sonar ******** ******** -Dsonar.host.url=http://HOSTNAME:8080/sonar 16:05:31 + Error stacktraces are turned on. 16:05:33 [INFO] Scanning for projects... 16:05:33 [INFO] Searching repository for plugin with prefix: 'sonar'. 16:05:34 [INFO] ------------------------------------------------------------------------ 16:05:34 [INFO] Building abp 16:05:34 [INFO] task-segment: [sonar:sonar] (aggregator-style) 16:05:34 [INFO] ------------------------------------------------------------------------ 16:05:34 [INFO] [sonar:sonar {execution: default-cli}] 16:05:34 [INFO] Sonar host: http://HOSTNAME:8080/sonar 16:05:34 [INFO] Sonar version: 2.3 16:05:34 [WARNING] Component returned which is not the same manager. Ignored. component=org.apache.maven.profiles.activation.JdkPrefixProfileActivator@448e448e .... 16:05:36 [WARNING] Component returned which is not the same manager. Ignored. component=org.apache.maven.profiles.activation.JdkPrefixProfileActivator@448e448e 16:05:39 [INFO] [sonar-core:internal {execution: default-internal}] 16:05:40 [INFO] Database dialect class org.sonar.jpa.dialect.MySql 16:05:42 [INFO] ------------- Analyzing abp trunk 16:05:44 [INFO] Selected quality profile : [name=literal requirements,language=java] 16:05:44 [INFO] Configure maven plugins... 16:05:46 [INFO] Sensor SquidSensor... 16:05:47 [INFO] Java AST scan... 16:05:47 [INFO] ------------------------------------------------------------------------ 16:05:47 [ERROR] BUILD ERROR 16:05:47 [INFO] ------------------------------------------------------------------------ 16:05:47 [INFO] Can not execute Sonar 16:05:47 16:05:47 Embedded error: Got an exception - null, file : /export/build/hudson-slave/workspace/abp/abp/ABP_ams-build/build/sonar/source/com/dcx/abpneu/sfw/mail/SendMailCommand.java, line : 0 16:05:47 [INFO] ------------------------------------------------------------------------ 16:05:47 [INFO] Trace 16:05:47 org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) 16:05:47 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) 16:05:47 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) 16:05:47 at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) 16:05:47 at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) 16:05:47 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 16:05:47 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) 16:05:47 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16:05:47 at java.lang.reflect.Method.invoke(Method.java:618) 16:05:47 at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) 16:05:47 at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) 16:05:47 at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) 16:05:47 at org.codehaus.classworlds.Launcher.main(Launcher.java:375) 16:05:47 Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar 16:05:47 at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:87) 16:05:47 at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65) 16:05:47 at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117) 16:05:47 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) 16:05:47 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) 16:05:47 ... 17 more 16:05:47 Caused by: org.sonar.squid.api.AnalysisException: Got an exception - null, file : /export/build/hudson-slave/workspace/abp/abp/ABP_ams-build/build/sonar/source/com/dcx/abpneu/sfw/mail/SendMailCommand.java, line : 0 16:05:47 at org.sonar.java.ast.CheckstyleAuditListener.addError(CheckstyleAuditListener.java:40) 16:05:47 at com.puppycrawl.tools.checkstyle.Checker.fireErrors(Checker.java:513) 16:05:47 at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:279) 16:05:47 at org.sonar.java.ast.JavaAstScanner.launchCheckstyleEngine(JavaAstScanner.java:93) 16:05:47 at org.sonar.java.ast.JavaAstScanner.scanFiles(JavaAstScanner.java:156) 16:05:47 at org.sonar.plugins.squid.SquidExecutor.scanSources(SquidExecutor.java:136) 16:05:47 at org.sonar.plugins.squid.SquidExecutor.scan(SquidExecutor.java:83) 16:05:47 at org.sonar.plugins.squid.SquidSensor.analyse(SquidSensor.java:81) 16:05:47 at org.sonar.batch.SensorsExecutor.execute(SensorsExecutor.java:58) 16:05:47 at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:59) 16:05:47 at org.sonar.batch.Batch.analyzeProject(Batch.java:113) 16:05:47 at org.sonar.batch.Batch.analyzeProjects(Batch.java:82) 16:05:47 at org.sonar.batch.Batch.execute(Batch.java:57) 16:05:47 at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:142) 16:05:47 at org.sonar.maven2.BatchMojo.execute(BatchMojo.java:133) 16:05:47 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) 16:05:47 at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82) 16:05:47 ... 21 more 16:05:47 [INFO] ------------------------------------------------------------------------ 16:05:47 [INFO] Total time: 14 seconds 16:05:47 [INFO] Finished at: Sat Oct 30 16:05:51 CEST 2010 16:05:47 [INFO] Final Memory: 16M/48M 16:05:47 [INFO] ------------------------------------------------------------------------ 16:05:48 Finished: FAILURE {code} It seems as if there is a problem with Checkstyle. Therefore I ran Checkstyle manually with the same configuration file: {code} <file name="C:\work\workspaces\abp\ServerFramework\ejbModule\com\dcx\abpneu\sfw\mail\SendMailCommand.java"> <error line="0" severity="error" message="Folgende Ausnahme ist aufgetreten - java.lang.RuntimeException: Kann zum Tag &apos;InvalidMailAddressException&apos; keine Klasseninformation zu @throws laden." source="com.puppycrawl.tools.checkstyle.TreeWalker"/> <error line="9" severity="error" message="Die Form &apos;.*&apos; für import-Anweisungen sollte vermieden werden - com.dcx.abpneu.sfw.exceptions.*." source="com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck"/> <error line="26" column="1" severity="error" message="File contains tab characters (this is the first instance)." source="com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck"/> <error line="35" column="28" severity="error" message="Variable &apos;senderInfo&apos; muss private sein." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/> <error line="40" column="26" severity="error" message="Variable &apos;subject&apos; muss private sein." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/> <error line="45" column="26" severity="error" message="Variable &apos;mailText&apos; muss private sein." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/> <error line="50" column="30" severity="error" message="Variable &apos;recipientInfo&apos; muss private sein." source="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck"/> <error line="199" severity="error" message="Zeile länger als 120 Zeichen" source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/> <error line="212" severity="error" message="Zeile länger als 120 Zeichen" source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/> <error line="225" severity="error" message="Zeile länger als 120 Zeichen" source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/> <error line="238" severity="error" message="Zeile länger als 120 Zeichen" source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/> <error line="251" severity="error" message="Zeile länger als 120 Zeichen" source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/> <error line="264" severity="error" message="Zeile länger als 120 Zeichen" source="com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck"/> </file> {code}

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

    Automated exception search integrated into your IDE

  5. 0

    Configuration class not found for WebLogic local standalone with cargo maven plugin

    Stack Overflow | 3 years ago | vacao
    org.apache.maven.lifecycle.LifecycleExecutionException: Custom configuration implementation [org.codehaus.cargo.container.weblogic.WebLogic103xStandaloneLocalConfiguration] cannot be loaded
  6. 0

    Deploy with maven plugin on remote weblogic 12c

    Stack Overflow | 4 years ago | bmlynarczyk
    org.apache.maven.lifecycle.LifecycleExecutionException: Invalid file. Please provide an existing fully qualified path of the file.

    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. org.apache.maven.lifecycle.LifecycleExecutionException

      Can not execute Sonar

      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals()
    2. Maven Core
      DefaultLifecycleExecutor.executeGoals
      1. org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
      1 frame