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

javax.xml.transform.TransformerException: An invalid XML character (Unicode: 0x0) was found in the CDATA section.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: nunit-plugin
    • Labels:
    • Environment:
      Windows 7 x64
      JRE version 1.7.0_11-b21 64-Bit
    • Similar Issues:

      Description

      I have a .NET DLL which contains tests that run with NUnit 2.5
      When a crash happens, the XML is malformed and the plugin crashes.

      I know the test should be fixed, but would it be possible for the plugin to not crash or filter the XML so that the failing test displays a generic error message in the final report.

      There's the call stack :
      --------------------------------------------------------------------------
      hudson.util.IOException2: remote file operation failed: ******* at hudson.remoting.Channel@*********
      at hudson.FilePath.act(FilePath.java:861)
      at hudson.FilePath.act(FilePath.java:838)
      at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:102)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:820)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:792)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:739)
      at hudson.model.Run.execute(Run.java:1592)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:237)
      Caused by: hudson.util.IOException2: Could not transform the NUnit report. Please report this issue to the plugin author
      at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:57)
      at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:26)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:58)
      at java.lang.Thread.run(Unknown Source)
      Caused by: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: An invalid XML character (Unicode: 0x0) was found in the CDATA section.
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
      at hudson.plugins.nunit.NUnitReportTransformer.transform(NUnitReportTransformer.java:67)
      at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:55)
      ... 12 more
      Caused by: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: An invalid XML character (Unicode: 0x0) was found in the CDATA section.
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(Unknown Source)
      ... 16 more
      Caused by: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: An invalid XML character (Unicode: 0x0) was found in the CDATA section.
      at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
      at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
      ... 17 more
      --------------------------------------------------------------------------

      Part of the failing test output that is obviously causing the error :
      ydü>H†cÔ@?ˆÔ¯@v&@v&? '?«C-äD|ªÔ¯'?¶xŠï?;Ï’<Òš“÷[·ƒk>'?…Ï<…6¤Öc?…Ï?…Ï@v&Ô¯?ÔÏX…6 cäD?T`…6�&c\…6>'Ô¯|…6¤ÖcÔ¯Ô¯@v&_c"m,)co…6Ô¯@†'�ƒ6ÞR‰Ts? 6…â�·…6œb"mD®< 6Ñ…6BMO 69?O 6ÿ ‰ÞR‰ Q?Oÿ ‰8†6@› 6„1?› 6$ 6„„62?@185**

      Thank you

        Attachments

          Activity

          micmarcil Michael Marcil created issue -
          micmarcil Michael Marcil made changes -
          Field Original Value New Value
          Description I have a .NET DLL which contains tests that run with NUnit 2.5
          When a crash happens, the XML is malformed and the plugin crashes.

          I know the test should be fixed, but would it be possible for the plugin to not crash or filter the XML so that the failing test displays a generic error message in the final report.

          There's the call stack :
          --------------------------------------------------------------------------
          hudson.util.IOException2: remote file operation failed: ******* at hudson.remoting.Channel@*********
          at hudson.FilePath.act(FilePath.java:861)
          at hudson.FilePath.act(FilePath.java:838)
          at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:102)
          at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:820)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:792)
          at hudson.model.Build$BuildExecution.post2(Build.java:183)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:739)
          at hudson.model.Run.execute(Run.java:1592)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:237)
          Caused by: hudson.util.IOException2: Could not transform the NUnit report. Please report this issue to the plugin author
          at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:57)
          at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:26)
          at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
          at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:326)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at hudson.remoting.Engine$1$1.run(Engine.java:58)
          at java.lang.Thread.run(Unknown Source)
          Caused by: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: An invalid XML character (Unicode: 0x0) was found in the CDATA section.
          at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
          at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
          at hudson.plugins.nunit.NUnitReportTransformer.transform(NUnitReportTransformer.java:67)
          at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:55)
          ... 12 more
          Caused by: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: An invalid XML character (Unicode: 0x0) was found in the CDATA section.
          at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(Unknown Source)
          ... 16 more
          Caused by: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: An invalid XML character (Unicode: 0x0) was found in the CDATA section.
          at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
          at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
          ... 17 more
          --------------------------------------------------------------------------


          Part of the failing test output that is obviously causing the error :
          ydü>H†cÔ@?ˆÔ¯@v&@v&? '?«C-äD|ªÔ¯'?¶xŠï?;Ï’<Òš“÷[·ƒk>'?…Ï<…6¤Öc?…Ï?…Ï@v&Ô¯?ÔÏX…6 cäD?T`…6�&c\…6>'Ô¯|…6¤ÖcÔ¯Ô¯@v&_c"m,)co…6Ô¯@†'�ƒ6ÞR‰Ts? 6…â�·…6œb"mD®< 6Ñ…6BMO 69?O 6ÿ ‰ÞR‰ Q?Oÿ ‰8†6@› 6„1?› 6$ 6„„62?@185**


          Thanks you
          I have a .NET DLL which contains tests that run with NUnit 2.5
          When a crash happens, the XML is malformed and the plugin crashes.

          I know the test should be fixed, but would it be possible for the plugin to not crash or filter the XML so that the failing test displays a generic error message in the final report.

          There's the call stack :
          --------------------------------------------------------------------------
          hudson.util.IOException2: remote file operation failed: ******* at hudson.remoting.Channel@*********
          at hudson.FilePath.act(FilePath.java:861)
          at hudson.FilePath.act(FilePath.java:838)
          at hudson.plugins.nunit.NUnitPublisher.perform(NUnitPublisher.java:102)
          at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:820)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:792)
          at hudson.model.Build$BuildExecution.post2(Build.java:183)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:739)
          at hudson.model.Run.execute(Run.java:1592)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:237)
          Caused by: hudson.util.IOException2: Could not transform the NUnit report. Please report this issue to the plugin author
          at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:57)
          at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:26)
          at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
          at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:326)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at hudson.remoting.Engine$1$1.run(Engine.java:58)
          at java.lang.Thread.run(Unknown Source)
          Caused by: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: An invalid XML character (Unicode: 0x0) was found in the CDATA section.
          at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
          at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
          at hudson.plugins.nunit.NUnitReportTransformer.transform(NUnitReportTransformer.java:67)
          at hudson.plugins.nunit.NUnitArchiver.invoke(NUnitArchiver.java:55)
          ... 12 more
          Caused by: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: An invalid XML character (Unicode: 0x0) was found in the CDATA section.
          at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(Unknown Source)
          ... 16 more
          Caused by: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: An invalid XML character (Unicode: 0x0) was found in the CDATA section.
          at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
          at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(Unknown Source)
          ... 17 more
          --------------------------------------------------------------------------


          Part of the failing test output that is obviously causing the error :
          ydü>H†cÔ@?ˆÔ¯@v&@v&? '?«C-äD|ªÔ¯'?¶xŠï?;Ï’<Òš“÷[·ƒk>'?…Ï<…6¤Öc?…Ï?…Ï@v&Ô¯?ÔÏX…6 cäD?T`…6�&c\…6>'Ô¯|…6¤ÖcÔ¯Ô¯@v&_c"m,)co…6Ô¯@†'�ƒ6ÞR‰Ts? 6…â�·…6œb"mD®< 6Ñ…6BMO 69?O 6ÿ ‰ÞR‰ Q?Oÿ ‰8†6@› 6„1?› 6$ 6„„62?@185**


          Thank you
          Hide
          cforcey Charles Forcey added a comment - - edited

          This is probably not related to the issue above! We have real error messaging being fired off by one of our tests around UTF characters. Jenkins is passing it along, but it or one of our reporting tools in between is turning a UTF error message into scrambled ascii at some point along the way. On a terminal, the same test displays the error message and the original UTF.

          Original error message:

          An error occurred in an after(:all) hook.
          Errno::EPERM: Operation not permitted - Operation not permitted - some/灾备环/cool境应/path/用启动
          occurred at org/jruby/RubyFile.java:1063:in `unlink'

          Jenkins reported error:

          An error occurred in an after(:all) hook.
          Errno::EPERM: Operation not permitted - Operation not permitted - some/�备环/cool境应/path/用�动 occurred at org/jruby/RubyFile.java:1063:in
          `unlink'}}

          The build goes on to succeed, but I think Jenkins or one of our tools is mangling the UTF of the error output by the time it ends up in the job log. Cheers! C

          Show
          cforcey Charles Forcey added a comment - - edited This is probably not related to the issue above! We have real error messaging being fired off by one of our tests around UTF characters. Jenkins is passing it along, but it or one of our reporting tools in between is turning a UTF error message into scrambled ascii at some point along the way. On a terminal, the same test displays the error message and the original UTF. Original error message: An error occurred in an after(:all) hook. Errno::EPERM: Operation not permitted - Operation not permitted - some/灾备环/cool境应/path/用启动 occurred at org/jruby/RubyFile.java:1063:in `unlink' Jenkins reported error: An error occurred in an after(:all) hook. Errno::EPERM: Operation not permitted - Operation not permitted - some/ç?¾å¤‡çŽ¯/cool境应/path/用å?¯åŠ¨ occurred at org/jruby/RubyFile.java:1063:in `unlink'}} The build goes on to succeed, but I think Jenkins or one of our tools is mangling the UTF of the error output by the time it ends up in the job log. Cheers! C
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 148700 ] JNJira + In-Review [ 177175 ]
          slide_o_mix Alex Earl made changes -
          Assignee redsolo [ redsolo ] Alex Earl [ slide_o_mix ]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          pom.xml
          src/main/java/hudson/plugins/nunit/InvalidXmlInputStream.java
          src/main/java/hudson/plugins/nunit/NUnitReportTransformer.java
          src/main/resources/hudson/plugins/nunit/nunit-to-junit.xsl
          src/test/java/hudson/plugins/nunit/NUnitReportTransformerTest.java
          src/test/resources/hudson/plugins/nunit/NUnit-issue17521.xml
          src/test/resources/hudson/plugins/nunit/NUnit-issue44315.xml
          src/test/resources/hudson/plugins/nunit/NUnit-issue44527.xml
          http://jenkins-ci.org/commit/nunit-plugin/66d639066e5463302844be20e11b9d1176052f7a
          Log:
          Fix JENKINS-17521, JENKINS-44527

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: pom.xml src/main/java/hudson/plugins/nunit/InvalidXmlInputStream.java src/main/java/hudson/plugins/nunit/NUnitReportTransformer.java src/main/resources/hudson/plugins/nunit/nunit-to-junit.xsl src/test/java/hudson/plugins/nunit/NUnitReportTransformerTest.java src/test/resources/hudson/plugins/nunit/NUnit-issue17521.xml src/test/resources/hudson/plugins/nunit/NUnit-issue44315.xml src/test/resources/hudson/plugins/nunit/NUnit-issue44527.xml http://jenkins-ci.org/commit/nunit-plugin/66d639066e5463302844be20e11b9d1176052f7a Log: Fix JENKINS-17521 , JENKINS-44527
          Hide
          slide_o_mix Alex Earl added a comment -

          Will be resolved in 0.21

          Show
          slide_o_mix Alex Earl added a comment - Will be resolved in 0.21
          slide_o_mix Alex Earl made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              micmarcil Michael Marcil
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: