teamcity生成失败,原因是“未能解析xml报告”:“在cdata节中发现无效的xml字符(unicode:0xffff)”

2cmtqfgy  于 2021-06-26  发布在  Java
关注(0)|答案(0)|浏览(399)

如何从构建日志中解决以下teamcity错误?生成失败,返回“未能解析xml报告”。

[Surefire report watcher] Parsing errors
[00:34:17]  [Parsing errors] Failed to parse 1 report
[00:34:17]  [Parsing errors] rose/target/surefire-reports/TEST-TestSuite.xml: An invalid XML character (Unicode: 0xffff) was found in the CDATA section.
[00:34:17]  [Parsing errors] jetbrains.buildServer.util.XmlXppAbstractParser$3: An invalid XML character (Unicode: 0xffff) was found in the CDATA section.
    at jetbrains.buildServer.util.XmlXppAbstractParser.parse(XmlXppAbstractParser.java:39)
    at jetbrains.buildServer.util.XmlXppAbstractParser.parse(XmlXppAbstractParser.java:31)
    at jetbrains.buildServer.xmlReportPlugin.parsers.antJUnit.AntJUnitReportParser.parse(AntJUnitReportParser.java:179)
    at jetbrains.buildServer.xmlReportPlugin.ParseReportCommand.run(ParseReportCommand.java:62)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.xml.sax.SAXParseException; lineNumber: 1489; columnNumber: 74; An invalid XML character (Unicode: 0xffff) was found in the CDATA section.
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at jetbrains.buildServer.util.XmlXppAbstractParser.parseWithSAX(XmlXppAbstractParser.java:240)
    at jetbrains.buildServer.util.XmlXppAbstractParser.parse(XmlXppAbstractParser.java:37)
    ... 8 more

xml文件(保存为工件)在notepad++中正确打开,但在chrome中单击打开时出现以下错误:

This page contains the following errors:
error on line 86 at column 18: Input is not proper UTF-8, indicate encoding !
Bytes: 0xEF 0xBF 0xBF 0x0A

如果有帮助的话,这个问题似乎是在将cucumber与testng Package 器一起使用之后引起的,因为我将junit和testng都作为依赖项。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题