Unable to collect changes, Error while parsing log output

Hi folks,

Can someone help me to figure out why Teamcity fails to build the project after I commit my changes.
First build do the job, but after I try to commit some changes I get error:
Unable to collect changes: jetbrains.buildServer.vcs.VcsException: Problem collecting changes for 'White Rabbit :: WR Complete Build' : Error collecting changes for VCS root 'white_rabbit'


Type of VCS: Mercurial
Test connection is successful.


The complete stacktrace is below.

[14:07:32] [CHECKING_FOR_CHANGES_ERROR]
[14:07:32] Unable to collect changes
java.util.concurrent.ExecutionException: jetbrains.buildServer.vcs.VcsException: Problem collecting changes for 'White Rabbit :: WR Complete Build' : Error collecting changes for VCS root 'white_rabbit'
Error while parsing log output:
<?xml version="1.0"?>
<log>
<logentry revision="54" node="5be494a3a067451a47bc9b0cd44b613569425c70" shortnode="5be494a3a067">
<author original="Misha Pupkin &lt;mipu@skiped.net&gt;" email="mipu@skiped.net">Misha Pupkin</author>
<date>Fri Oct 21 14:30:45 2011 +0300</date>
<msg xml:space="preserve">test</msg>
<paths>
<path action="M">digiform-flexclient/src/main/resources/initial.txt</path>
</paths>
</logentry>
<logentry revision="55" node="4e32330f6b170fc0271c87246038a7b03f602029" shortnode="4e32330f6b17">
<tag>tip</tag>
<author original="Misha Pupkin &lt;mipu@skiped.net&gt;" email="mipu@skiped.net">Misha Pupkin</author>
<date>Fri Oct 21 14:54:57 2011 +0300</date>
<msg xml:space="preserve">updated to vaadn 6.7.1</msg>
<paths>
<path action="M">pom.xml</path>
</paths>
</logentry>

at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at jetbrains.buildServer.serverSide.impl.CancelableTaskHolder.waitForTaskToComplete(CancelableTaskHolder.java:26)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.doCollectChanges(TopBuildDependencyGraphImpl.java:16)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.access$000(TopBuildDependencyGraphImpl.java:95)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$3.run(TopBuildDependencyGraphImpl.java:2)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$3.run(TopBuildDependencyGraphImpl.java:1)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl$4.run(TopBuildDependencyGraphImpl.java)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:9)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:12)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.runAsSystem(TopBuildDependencyGraphImpl.java:20)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.collectChangesForGraph(TopBuildDependencyGraphImpl.java:12)
at jetbrains.buildServer.serverSide.impl.dependency.TopBuildDependencyGraphImpl.collectChangesForGraph(TopBuildDependencyGraphImpl.java:8)
at jetbrains.buildServer.serverSide.impl.BuildChangesCollector.collectChangesForBuild(BuildChangesCollector.java:19)
at jetbrains.buildServer.serverSide.impl.BuildStarter$1.run(BuildStarter.java:33)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: jetbrains.buildServer.vcs.VcsException: Problem collecting changes for 'White Rabbit :: WR Complete Build' : Error collecting changes for VCS root 'white_rabbit'
Error while parsing log output:
<?xml version="1.0"?>
<log>
<logentry revision="54" node="5be494a3a067451a47bc9b0cd44b613569425c70" shortnode="5be494a3a067">
<author original="Misha Pupkin &lt;mipu@skiped.net&gt;" email="mipu@skiped.net">Misha Pupkin</author>
<date>Fri Oct 21 14:30:45 2011 +0300</date>
<msg xml:space="preserve">test</msg>
<paths>
<path action="M">digiform-flexclient/src/main/resources/initial.txt</path>
</paths>
</logentry>
<logentry revision="55" node="4e32330f6b170fc0271c87246038a7b03f602029" shortnode="4e32330f6b17">
<tag>tip</tag>
<author original="Misha Pupkin &lt;mipu@skiped.net&gt;" email="mipu@skiped.net">Misha Pupkin</author>
<date>Fri Oct 21 14:54:57 2011 +0300</date>
<msg xml:space="preserve">updated to vaadn 6.7.1</msg>
<paths>
<path action="M">pom.xml</path>
</paths>
</logentry>

at jetbrains.buildServer.vcs.impl.BuildChangesLoaderContext$BuildTypeCollectorResult.reThrowProblemException(BuildChangesLoaderContext.java:22)
at jetbrains.buildServer.vcs.impl.BuildChangesLoaderContext$BuildTypeCollectorResult.access$1100(BuildChangesLoaderContext.java:37)
at jetbrains.buildServer.vcs.impl.BuildChangesLoaderContext.checkNoProblemsInMyBuildTypes(BuildChangesLoaderContext.java:38)
at jetbrains.buildServer.vcs.impl.BuildChangesLoaderContext.checkingForChangesFinished(BuildChangesLoaderContext.java:85)
at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$1.call(VcsChangesCollectorImpl.java:4)
at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$1.call(VcsChangesCollectorImpl.java:1)
... 5 more
Caused by: jetbrains.buildServer.vcs.VcsException: Error collecting changes for VCS root 'white_rabbit'
Error while parsing log output:
<?xml version="1.0"?>
<log>
<logentry revision="54" node="5be494a3a067451a47bc9b0cd44b613569425c70" shortnode="5be494a3a067">
<author original="Misha Pupkin &lt;mipu@skiped.net&gt;" email="mipu@skiped.net">Misha Pupkin</author>
<date>Fri Oct 21 14:30:45 2011 +0300</date>
<msg xml:space="preserve">test</msg>
<paths>
<path action="M">digiform-flexclient/src/main/resources/initial.txt</path>
</paths>
</logentry>
<logentry revision="55" node="4e32330f6b170fc0271c87246038a7b03f602029" shortnode="4e32330f6b17">
<tag>tip</tag>
<author original="Misha Pupkin &lt;mipu@skiped.net&gt;" email="mipu@skiped.net">Misha Pupkin</author>
<date>Fri Oct 21 14:54:57 2011 +0300</date>
<msg xml:space="preserve">updated to vaadn 6.7.1</msg>
<paths>
<path action="M">pom.xml</path>
</paths>
</logentry>

at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.LogCommand.execute(LogCommand.java:87)
at jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialVcsSupport$6.collectChanges(MercurialVcsSupport.java:582)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.collectChanges(VcsChangesLoader.java:141)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.collectBuildChanges(VcsChangesLoader.java:91)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.collectChangesForCheckoutRules(VcsChangesLoader.java:142)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.collectChanges(VcsChangesLoader.java:180)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader._loadChangesForRoot(VcsChangesLoader.java:41)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.loadChangesForRoot(VcsChangesLoader.java:96)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.loadChangesForRoot(VcsChangesLoader.java:120)
at jetbrains.buildServer.vcs.impl.VcsManagerImpl.loadChanges(VcsManagerImpl.java:395)
at jetbrains.buildServer.serverSide.impl.auth.SecuredVcsManager.loadChanges(SecuredVcsManager.java:17)
at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$2.call(VcsChangesCollectorImpl.java:3)
at jetbrains.buildServer.vcs.impl.VcsChangesCollectorImpl$2.call(VcsChangesCollectorImpl.java:2)
... 5 more
Caused by: org.jdom.input.JDOMParseException: Error on line 20: XML document structures must start and end within the same entity.
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:504)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:888)
at com.intellij.openapi.util.JDOMUtil.loadDocument(JDOMUtil.java:302)
at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.LogCommand.parseChangeSetsXml(LogCommand.java:95)
at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.LogCommand.execute(LogCommand.java:85)
... 17 more
Caused by: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
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.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.scanContent(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(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.jdom.input.SAXBuilder.build(SAXBuilder.java:489)
... 21 more

[14:07:32] Build finished

3 comments
Comment actions Permalink

Hi Tema,

it seems like you use an old version of mercurial which had a bug: output from hg log --style=xml was not a valid xml, it is lack of final closing </log> tag. If it is so, please update hg at least up to 1.5.2.

0
Comment actions Permalink

I have updated hg on build agents to 2.0.1, but the bug is still reproduced. The error is the same. Apparently, the <log> tag is not closed. Do you need any additional information?
If I checkout the hg rep on the agent and run hg log --style=xml I seem to get a valid XML.

Added more information

0
Comment actions Permalink

Hi Vadim,

error happens on the TeamCity server, not on the agents, so to get rid of it, you have to update mercurial on the server.

0

Please sign in to leave a comment.