Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-4925

Error parsing JUnit output on Jenkins

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • QA Risk Assessment:
      Needs Assessment

      Description

      the tomcat and stdlib modules (so far) are affected by this. The Jenkins JUnit Results plugin is throwing a SAXParseException claiming that there are characters where there shouldn't be characters (paraphrase).

      the accounts module, for example, does not have this issue.

      sample failure:

      Failed to read test report file /tmp/jenkins/workspace/forge-module_puppetlabs-tomcat_unit-module_master/PUPPET_GEM_VERSION/4.6.2/RUBY_VER/ruby-2.3.1/WORKER_LABEL/unit/junit/testresult.xml
      org.dom4j.DocumentException: Error on line 37 of document file:///tmp/jenkins/workspace/forge-module_puppetlabs-tomcat_unit-module_master/PUPPET_GEM_VERSION/4.6.2/RUBY_VER/ruby-2.3.1/WORKER_LABEL/unit/junit/testresult.xml : Content is not allowed in trailing section. Nested exception: Content is not allowed in trailing section.
      	at org.dom4j.io.SAXReader.read(SAXReader.java:482)
      	at org.dom4j.io.SAXReader.read(SAXReader.java:264)
      	at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:126)
      	at hudson.tasks.junit.TestResult.parse(TestResult.java:302)
      	at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244)
      	at hudson.tasks.junit.TestResult.parse(TestResult.java:175)
      	at hudson.tasks.junit.TestResult.parse(TestResult.java:154)
      	at hudson.tasks.junit.TestResult.<init>(TestResult.java:126)
      	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:132)
      	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:107)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      	at hudson.remoting.Request$2.run(Request.java:336)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at hudson.remoting.Engine$1$1.run(Engine.java:94)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.xml.sax.SAXParseException; systemId: file:///tmp/jenkins/workspace/forge-module_puppetlabs-tomcat_unit-module_master/PUPPET_GEM_VERSION/4.6.2/RUBY_VER/ruby-2.3.1/WORKER_LABEL/unit/junit/testresult.xml; lineNumber: 37; columnNumber: 1; Content is not allowed in trailing section.
      	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
      	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
      	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$TrailingMiscDriver.next(XMLDocumentScannerImpl.java:1431)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
      	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
      	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
      	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
      	at org.dom4j.io.SAXReader.read(SAXReader.java:465)
      	... 19 more
      Nested exception: 
      org.xml.sax.SAXParseException; systemId: file:///tmp/jenkins/workspace/forge-module_puppetlabs-tomcat_unit-module_master/PUPPET_GEM_VERSION/4.6.2/RUBY_VER/ruby-2.3.1/WORKER_LABEL/unit/junit/testresult.xml; lineNumber: 37; columnNumber: 1; Content is not allowed in trailing section.
      	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
      	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
      	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
      	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$TrailingMiscDriver.next(XMLDocumentScannerImpl.java:1431)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
      	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
      	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
      	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
      	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
      	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
      	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
      	at org.dom4j.io.SAXReader.read(SAXReader.java:465)
      	at org.dom4j.io.SAXReader.read(SAXReader.java:264)
      	at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:126)
      	at hudson.tasks.junit.TestResult.parse(TestResult.java:302)
      	at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244)
      	at hudson.tasks.junit.TestResult.parse(TestResult.java:175)
      	at hudson.tasks.junit.TestResult.parse(TestResult.java:154)
      	at hudson.tasks.junit.TestResult.<init>(TestResult.java:126)
      	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:132)
      	at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:107)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      	at hudson.remoting.Request$2.run(Request.java:336)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at hudson.remoting.Engine$1$1.run(Engine.java:94)
      	at java.lang.Thread.run(Thread.java:745)
      

      What we know so far:
      From viewing the output on my machine...
      There are no obvious trailing characters in the xml ( cat -v -e junit/testresult.xml )
      There are no BOMs in the xml ( in vim, :setlocal bomb?)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                eric.putnam Eric Putnam
                Reporter:
                eric.putnam Eric Putnam
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support