Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-998

Problems with Umlauts in <system-out> (and probably <system-err>) content of junit xml report.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.15
    • 2.16
    • None

    Description

      When I output german umlauts on stdout, with surefire-2.14.1 everything runs fine, with surefire-2.15-SNAPSHOT (ce62b9a2c0b36105355f44c71f29f01d2f818c46) I get the following stacktrace:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-report-plugin:2.15-SNAPSHOT:report (default-cli) on project surefire-encoding-test: An error has occurred in Surefire Report report generation. Error parsing JUnit XML report /Users/mirko/workspace/foss/pastebin/target/surefire-reports/TEST-net.friedenhagen.surefireencodingtest.EncodingTest.xml: The reference to entity "amp" must end with the ';' delimiter. -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-report-plugin:2.15-SNAPSHOT:report (default-cli) on project surefire-encoding-test: An error has occurred in Surefire Report report generation.
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
      	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:320)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Surefire Report report generation.
      	at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:122)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      	... 19 more
      Caused by: org.apache.maven.reporting.MavenReportException: Error parsing JUnit XML report /Users/mirko/workspace/foss/pastebin/target/surefire-reports/TEST-net.friedenhagen.surefireencodingtest.EncodingTest.xml
      	at org.apache.maven.plugins.surefire.report.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:100)
      	at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:64)
      	at org.apache.maven.plugins.surefire.report.AbstractSurefireReportMojo.executeReport(AbstractSurefireReportMojo.java:185)
      	at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
      	at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:99)
      	... 21 more
      Caused by: org.xml.sax.SAXParseException; lineNumber: 66; columnNumber: 54; The reference to entity "amp" must end with the ';' delimiter.
      	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      	at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source)
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
      	at org.apache.maven.plugins.surefire.report.TestSuiteXmlParser.parse(TestSuiteXmlParser.java:101)
      	at org.apache.maven.plugins.surefire.report.TestSuiteXmlParser.parse(TestSuiteXmlParser.java:81)
      	at org.apache.maven.plugins.surefire.report.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:92)
      	... 25 more
      [ERROR]
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      

      Probably related to SUREFIRE-996.

      How to reproduce:

      • Install surefire-snapshot (Revision: ce62b9a2c0b36105355f44c71f29f01d2f818c46)
      • Download attached zip:
        • mvn -e -Dmaven-surefire-plugin.version=2.15-SNAPSHOT will produce the stacktrace above
        • mvn -e -Dmaven-surefire-plugin.version=2.14.1 will run successfully.

      Attachments

        1. pastebin-surefire-encoding-test (1).zip
          3 kB
          Mirko Friedenhagen
        2. pastebin-surefire-encoding-test.zip
          3 kB
          Mirko Friedenhagen

        Issue Links

          Activity

            People

              agudian Andreas Gudian
              mfriedenhagen Mirko Friedenhagen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: