Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-8855

Make it obvious that generic coverage report expect an XML file

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.6-M3, 6.6
    • Component/s: Scanner
    • Labels:

      Description

      Some users get confused and try to pass JaCoCo reports to the generic coverage feature.
      https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/sonarqube/tcplQ0-eGwc/5BI8xtSWAQAJ

      The error message could be a bit more explicit:

      error	27-Feb-2017 17:08:55	ERROR: Error during SonarQube Scanner execution
      error	27-Feb-2017 17:08:55	java.lang.IllegalStateException: Cannot parse coverage report D:\BAMBOO_HOME\xml-data\build-dir\MGM-MSSOSK-JOB1\target\jacoco.exec
      error	27-Feb-2017 17:08:55		at org.sonar.plugins.coverage.generic.GenericCoverageSensor.loadReport(GenericCoverageSensor.java:128)
      error	27-Feb-2017 17:08:55		at org.sonar.plugins.coverage.generic.GenericCoverageSensor.analyseWithLogger(GenericCoverageSensor.java:95)
      error	27-Feb-2017 17:08:55		at org.sonar.plugins.coverage.generic.GenericCoverageSensor.analyse(GenericCoverageSensor.java:91)
      error	27-Feb-2017 17:08:55		at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
      error	27-Feb-2017 17:08:55		at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
      error	27-Feb-2017 17:08:55		at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
      error	27-Feb-2017 17:08:55		at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:182)
      error	27-Feb-2017 17:08:55		at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
      error	27-Feb-2017 17:08:55		at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
      error	27-Feb-2017 17:08:55		at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:247)
      error	27-Feb-2017 17:08:55		at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:242)
      error	27-Feb-2017 17:08:55		at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:232)
      error	27-Feb-2017 17:08:55		at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
      error	27-Feb-2017 17:08:55		at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
      error	27-Feb-2017 17:08:55		at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
      error	27-Feb-2017 17:08:55		at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
      error	27-Feb-2017 17:08:55		at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
      error	27-Feb-2017 17:08:55		at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
      error	27-Feb-2017 17:08:55		at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
      error	27-Feb-2017 17:08:55		at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:118)
      error	27-Feb-2017 17:08:55		at org.sonar.runner.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:67)
      error	27-Feb-2017 17:08:55		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      error	27-Feb-2017 17:08:55		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      error	27-Feb-2017 17:08:55		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      error	27-Feb-2017 17:08:55		at java.lang.reflect.Method.invoke(Method.java:498)
      error	27-Feb-2017 17:08:55		at org.sonar.runner.impl.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:61)
      error	27-Feb-2017 17:08:55		at com.sun.proxy.$Proxy0.execute(Unknown Source)
      error	27-Feb-2017 17:08:55		at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:274)
      error	27-Feb-2017 17:08:55		at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:165)
      error	27-Feb-2017 17:08:55		at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:152)
      error	27-Feb-2017 17:08:55		at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:133)
      error	27-Feb-2017 17:08:55		at org.sonarsource.scanner.cli.Main.execute(Main.java:82)
      error	27-Feb-2017 17:08:55		at org.sonarsource.scanner.cli.Main.main(Main.java:66)
      error	27-Feb-2017 17:08:55	Caused by: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 middle byte 0xc0 (at char #1, byte #-1)
      error	27-Feb-2017 17:08:55		at com.ctc.wstx.sr.StreamScanner.constructFromIOE(StreamScanner.java:633)
      error	27-Feb-2017 17:08:55		at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:1007)
      error	27-Feb-2017 17:08:55		at com.ctc.wstx.sr.StreamScanner.getNext(StreamScanner.java:762)
      error	27-Feb-2017 17:08:55		at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2002)
      error	27-Feb-2017 17:08:55		at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1131)
      

        Attachments

          Activity

            People

            Assignee:
            julien.henry Julien Henry
            Reporter:
            julien.henry Julien Henry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: