It's all about the answers!

Ask a question

Build Failing due to junitLogPublisher Xml Parsing Error


Mark Bisset (111) | asked Jan 19 '12, 10:45 a.m.
We are using BuildSystemToolkit-2.0.0.2iFix7a and are getting a NullPointerException during the junitLogPublisher target when ever the junit tests report an error or failure. The publish works if the tests all pass. The stack trace is:

2012-01-19 10:07:18 [Jazz build engine] Invoking post-build participant "com.ibm.team.build.junit.publishing"
java.lang.NullPointerException
at com.ibm.team.build.internal.parser.JUnitLogParser.endChildElement(JUnitLogParser.java:258)
at com.ibm.team.build.internal.parser.AbstractParserHandlerBase.endElement(AbstractParserHandlerBase.java:238)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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 com.ibm.team.build.internal.parser.AbstractParserHandlerBase.parse(AbstractParserHandlerBase.java:141)
at com.ibm.team.build.internal.publishing.JUnitLogPublisher.publishFile(JUnitLogPublisher.java:207)
at com.ibm.team.build.internal.publishing.JUnitLogPublisher.publish(JUnitLogPublisher.java:169)
at com.ibm.team.build.internal.engine.JUnitPublishingPostBuildParticipant.postBuild(JUnitPublishingPostBuildParticipant.java:50)
at com.ibm.team.build.internal.engine.BuildLoop.invokePostBuildParticipants(BuildLoop.java:685)
at com.ibm.team.build.internal.engine.BuildLoop$2.run(BuildLoop.java:471)
at java.lang.Thread.run(Thread.java:736)


This is an example xml file that would raise the error:

<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.some.company.some_tests" timestamp="2012-01-19T14:24:01" hostname="MYHOST" id="5" package="com.some.company.some_tests" tests="1" failures="1" errors="0" skipped="0" time="0.079">
<testcase name="testPathInfoWithNull" classname="com.some.company.some_tests.http.URLInformationTestCase" time="0.0">
<failure type="junit.framework.ComparisonFailure"/>
</testcase>
</testsuite>


Any help in this regard would be greatly appreciated.

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.