Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-7951

Build fails on parsing coverage.xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • cobertura-plugin
    • None
    • Hudson 1.382, Ubuntu Linux, Hudson Cobatura Plugin 1.0, Java 1.6.0_03

      Since recently updatung Hudson and Cobatura, our build fails. The compilation and generation of the coverage reports (coverage.xml) works fine, but of the 8 reports 2 are always incompletely copied to the build folder. The result is incomplete XML with causes the build to fail:

      Publishing Cobertura coverage report...
      Publishing Cobertura coverage results...
      FATAL: Unable to parse /home/cruise/opt/hudson-work/jobs/trunk_libs/builds/2010-10-29_07-50-35/coverage6.xml
      hudson.util.IOException2: Cannot parse coverage results
      	at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:89)
      	at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:52)
      	at hudson.plugins.cobertura.CoberturaPublisher.perform(CoberturaPublisher.java:262)
      	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558)
      	at hudson.model.Build$RunnerImpl.post2(Build.java:157)
      	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
      	at hudson.model.Run.run(Run.java:1304)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:139)
      Caused by: org.xml.sax.SAXParseException: The element type "conditions" must be terminated by the matching end-tag "</conditions>".
      	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
      	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
      	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1411)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1739)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2923)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
      	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
      	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
      	at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
      	at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
      	at hudson.plugins.cobertura.CoberturaCoverageParser.parse(CoberturaCoverageParser.java:81)
      	... 12 more
      

      The file itself very clearly just 'stops' and is incomplete.

            stephenconnolly Stephen Connolly
            nhatherly nhatherly
            Votes:
            19 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved: