Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
617 views
in Technique[技术] by (71.8m points)

java - TeamCity build failed because of "Failed to parse xml report": "An invalid XML character (Unicode: 0xffff) was found in the CDATA section."

How do I resolve the following TeamCity error from the build log? The build fails with "Failed to parse xml report".

[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

The XML file (saved as an artifact) opens properly in Notepad++, but I get the following error when I click to open it in 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

If it helps, the issue seems to be caused after using Cucumber with a TestNG wrapper since I have both JUnit and TestNG as dependencies.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...