Invalid xml in vault history

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
LennyT
Posts: 8
Joined: Sun Nov 09, 2008 6:05 pm

Invalid xml in vault history

Post by LennyT » Tue Apr 21, 2009 5:49 pm

We are having trouble with getting the Vault history in CCNet when someone puts 'strange' characters in a Vault commit comment.

When the history is provided to CCNet, a .Net exception is thrown parsing the xml, for instance:

2009-04-22 01:40:11,635 [Project Overnight:ERROR] INTERNAL ERROR: '', hexadecimal value 0x07, is an invalid character. Line 13, position 192.
----------
System.Xml.XmlException: '', hexadecimal value 0x07, is an invalid character. Line 13, position 192.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar)
at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.VaultHistoryParser.Parse(TextReader history, DateTime from, DateTime to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.ParseModifications(ProcessResult result, DateTime from, DateTime to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vault317.GetModificationsFromItemHistory(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vault317.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.VaultVersionChecker.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.FilteredSourceControl.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.GetModifications(IIntegrationResult from, IIntegrationResult to)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)
at ThoughtWorks.CruiseControl.Core.Project.Integrate(IntegrationRequest request)
at ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Integrate()
at ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Run()
----------

In this case someone had copy pasted a set of bullet points from a Word document into the Vault comments and the bullet character has caused invalid xml to be generated by Vault.

Is there a fix for this problem, other than the obvious work around of not putting strange characters in Vault comments.

Thanks
Marc Thompson

Our Vault version details:

[22/04/2009 9:38:23 AM] Version Check: This Vault client is version 4.1.4.18402
[22/04/2009 9:38:24 AM] Version Check: Your Vault server is version 4.1.4.18402

CCNet version: 1.4.2.14

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Invalid xml in vault history

Post by lbauer » Thu Apr 23, 2009 4:02 pm

We don't have a fix for this, but we'll log a bug and investigate further.

Would it help if you could change the comment in history and delete the bullets? You can do this with Show History on the item, then right-clicking the specific version in the history result, then selecting Details->Edit Comment.

If it's a Change set comment on a folder, then you'd need to Show History on the folder and select View History by Folder version.
Linda Bauer
SourceGear
Technical Support Manager

LennyT
Posts: 8
Joined: Sun Nov 09, 2008 6:05 pm

Re: Invalid xml in vault history

Post by LennyT » Thu Apr 23, 2009 7:38 pm

Unfortunately this error is occurring during an automated build through CCNet, and the build fails silently (which is a CCNet problem). So manually changing the comments certainly fixes the problem, but doesnt help the automated build. The CCNet support reply to this issue said this issue should be adressed to 'Ian', but thats not an option in the support forum.

Thanks
Marc Thompson

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Invalid xml in vault history

Post by lbauer » Fri Apr 24, 2009 3:38 pm

Since the build looks at the most recent comment, changing the comment should allow the build to work.

In terms of a longer-term solution, I've logged this as a bug and we may be able to address this in the future.

Ian did work on the CCNet plugin, but he's concentrating on Visual Studio issues at the moment. : )
Linda Bauer
SourceGear
Technical Support Manager

Post Reply