Issue Type: Bug Bug
Affects Versions: 2.1
Assignee: Simon Brandhof
Created: 20/Jan/14 5:54 AM
Description:

This happens for various classes on my different projects.

It seems similar to http://jira.codehaus.org/browse/SONARPLUGINS-925 but I don't have any TODO code in that file (see code at end)

Relevant portion of the log file:

[INFO] [11:47:47.945] Execute org.apache.maven.plugins:maven-surefire-plugin:2.16:test done: 7154 ms
[INFO] [11:47:47.946] Index files
[INFO] [11:47:47.981] 13 files indexed
[INFO] [11:47:47.981] Execute maven plugin maven-surefire-plugin done: 7191 ms
[INFO] [11:47:47.981] Initializer JacocoMavenInitializer...
[INFO] [11:47:47.982] Initializer JacocoMavenInitializer done: 1 ms
[INFO] [11:47:47.982] Index files
[INFO] [11:47:48.009] 13 files indexed
[INFO] [11:47:48.009] Base dir: /var/lib/jenkins/jobs/API-OMDB/workspace
[INFO] [11:47:48.010] Working dir: /var/lib/jenkins/jobs/API-OMDB/workspace/target/sonar
[INFO] [11:47:48.010] Source dirs: /var/lib/jenkins/jobs/API-OMDB/workspace/src/main/java
[INFO] [11:47:48.010] Test dirs: /var/lib/jenkins/jobs/API-OMDB/workspace/src/test/java
[INFO] [11:47:48.010] Binary dirs: /var/lib/jenkins/jobs/API-OMDB/workspace/target/classes
[INFO] [11:47:48.010] Source encoding: UTF-8, default locale: en_US
[INFO] [11:47:48.021] Sensor JavaSourceImporter...
[INFO] [11:47:48.260] Sensor JavaSourceImporter done: 239 ms
[INFO] [11:47:48.261] Sensor JavaSquidSensor...
[INFO] [11:47:48.446] Java AST scan...
[INFO] [11:47:48.457] 10 source files to be analyzed
[INFO] [11:47:49.407] 10/10 source files analyzed
[INFO] [11:47:49.431] Java AST scan done: 985 ms
[INFO] [11:47:49.435] Java bytecode scan...
[INFO] [11:47:49.599] Java bytecode scan done: 164 ms
[INFO] [11:47:49.628] Package design analysis...
[INFO] [11:47:49.695] Package design analysis done: 67 ms
[INFO] [11:47:49.803] Sensor JavaSquidSensor done: 1542 ms
[INFO] [11:47:49.803] Sensor ResourceToFileMapper...
[INFO] [11:47:49.818] Sensor ResourceToFileMapper done: 15 ms
[INFO] [11:47:49.818] Sensor SurefireSensor...
[INFO] [11:47:49.820] parsing /var/lib/jenkins/jobs/API-OMDB/workspace/target/surefire-reports
[INFO] [11:47:50.180] Sensor SurefireSensor done: 362 ms
[INFO] [11:47:50.189] Sensor CpdSensor...
[INFO] [11:47:50.190] SonarEngine is used
[INFO] [11:47:50.192] Cross-project analysis disabled
[INFO] [11:47:50.437] Sensor CpdSensor done: 248 ms
[INFO] [11:47:50.437] Sensor InitialOpenIssuesSensor...
[INFO] [11:47:50.469] Sensor InitialOpenIssuesSensor done: 32 ms
[INFO] [11:47:50.470] Sensor ProfileSensor...
[INFO] [11:47:50.484] Sensor ProfileSensor done: 14 ms
[INFO] [11:47:50.485] Sensor ProfileEventsSensor...
[INFO] [11:47:50.576] Sensor ProfileEventsSensor done: 91 ms
[INFO] [11:47:50.576] Sensor ProjectLinksSensor...
[INFO] [11:47:50.615] Sensor ProjectLinksSensor done: 38 ms
[INFO] [11:47:50.615] Sensor VersionEventsSensor...
[INFO] [11:47:50.656] Sensor VersionEventsSensor done: 41 ms
[INFO] [11:47:50.657] Sensor FileHashSensor...
[INFO] [11:47:50.663] Sensor FileHashSensor done: 6 ms
[INFO] [11:47:50.663] Sensor Maven dependencies...
[INFO] [11:47:51.170] Sensor Maven dependencies done: 507 ms
[INFO] [11:47:51.170] Sensor JaCoCoSensor...
[INFO] [11:47:51.181] Analysing /var/lib/jenkins/jobs/API-OMDB/workspace/target/jacoco.exec
[INFO] [11:47:51.490] No information about coverage per test.
[INFO] [11:47:51.490] Sensor JaCoCoSensor done: 320 ms
[INFO] [11:47:52.451] Execute decorators...
[ERROR] Fail to decorate 'com.omertron.omdbapi.OMDBException'
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.666s
[INFO] Finished at: Mon Jan 20 11:47:52 CET 2014
[INFO] Final Memory: 20M/355M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.1:sonar (default-cli) on project API-OMDB: Can not execute SonarQube analysis: Fail to decorate 'com.omertron.omdbapi.OMDBException': NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.1:sonar (default-cli) on project API-OMDB: Can not execute SonarQube analysis
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute SonarQube analysis
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:109)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:67)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:109)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Fail to decorate 'com.omertron.omdbapi.OMDBException'
at org.sonar.maven.ExceptionHandling.handle(ExceptionHandling.java:37)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:175)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:104)
... 23 more
Caused by: org.sonar.api.utils.SonarException: Fail to decorate 'com.omertron.omdbapi.OMDBException'
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:93)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:76)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:69)
at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:61)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:118)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:150)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:211)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:206)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:199)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:58)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:144)
at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:132)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
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.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
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:90)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:173)
... 24 more
Caused by: java.lang.NullPointerException
at org.sonar.api.profiles.RulesProfile.getActiveRule(RulesProfile.java:369)
at org.sonar.plugins.uselesscodetracker.decorator.ViolationsDecorator.saveFileMeasure(ViolationsDecorator.java:86)
at org.sonar.plugins.uselesscodetracker.decorator.ViolationsDecorator.decorate(ViolationsDecorator.java:72)
at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:85)
... 62 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Sonar analysis completed: FAILURE

----- CODE -----
public class OMDBException extends Exception {

private static final long serialVersionUID = 1L;

public enum OMDBExceptionType

{ /* * Unknown error occured */ UNKNOWN_CAUSE, /* * URL is invalid */ INVALID_URL, /* * Page not found */ HTTP_404_ERROR, /* * The movie id was not found */ MOVIE_NOT_FOUND, /* * Mapping failed from target to internal onbjects */ MAPPING_FAILED, /* * Error connecting to the service */ CONNECTION_ERROR, /* * Image was invalid */ INVALID_IMAGE, /* * Autorisation rejected */ AUTHORISATION_FAILURE, /* * Service Unavailable, usually temporary */ HTTP_503_ERROR; }

private final OMDBExceptionType exceptionType;
private final String response;

public OMDBException(final OMDBExceptionType exceptionType, final String response)

{ super(); this.exceptionType = exceptionType; this.response = response; }

public OMDBException(final OMDBExceptionType exceptionType, final String response, final Throwable cause)

{ super(cause); this.exceptionType = exceptionType; this.response = response; }

public OMDBExceptionType getExceptionType()

{ return exceptionType; }

public String getResponse()

{ return response; }

}

Environment: Building a project in Jenkins with Maven Plugin
Project: Mojo's Sonar Maven Plugin
Priority: Blocker Blocker
Reporter: Stuart Boston
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to