CCNET+SVNの文字コード変換に iconv.exe を使った際の問題
会社のCCNETで1つ問題が発生。
今のCCNETでSVNからの変更セットをXMLで取得し文字コードを変換かけていますが、そこで1つ問題がありました。
SVN側で変更ファイルが多い場合、XMLのサイズが大きくなって文字コード変換をしている iconv.exe でエラーが発生します。
[Ccnet.log の出力]
---------- ThoughtWorks.CruiseControl.Core.CruiseControlException: Unable to load the output from svn: <?xml version="1.0" encoding="utf-8"?> … ---> System.Xml.XmlException: 予期しないファイルの終わりが検出されました。次の要素が閉じられていません。path, paths, logentry, log. 行 92、位置 1 です。 場所 System.Xml.XmlTextReaderImpl.Throw(Exception e) 場所 System.Xml.XmlTextReaderImpl.Throw(String res, String arg) 場所 System.Xml.XmlTextReaderImpl.ThrowUnclosedElements() 場所 System.Xml.XmlTextReaderImpl.ParseElementContent() 場所 System.Xml.XmlTextReaderImpl.Read() 場所 System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) 場所 System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) 場所 System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) 場所 System.Xml.XmlDocument.Load(XmlReader reader) 場所 System.Xml.XmlDocument.LoadXml(String xml) 場所 ThoughtWorks.CruiseControl.Core.Sourcecontrol.SvnHistoryParser.ReadSvnLogIntoXmlNode(TextReader svnLog) --- 内部例外スタック トレースの終わり --- 場所 ThoughtWorks.CruiseControl.Core.Sourcecontrol.SvnHistoryParser.ReadSvnLogIntoXmlNode(TextReader svnLog) 場所 ThoughtWorks.CruiseControl.Core.Sourcecontrol.SvnHistoryParser.Parse(TextReader svnLog, DateTime from, DateTime to) 場所 ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.ParseModifications(TextReader reader, DateTime from, DateTime to) 場所 ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.ParseModifications(ProcessResult result, DateTime from, DateTime to) 場所 ThoughtWorks.CruiseControl.Core.Sourcecontrol.Svn.GetModifications(IIntegrationResult from, IIntegrationResult to) 場所 ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild) 場所 ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request) 場所 ThoughtWorks.CruiseControl.Core.Project.Integrate(IntegrationRequest request) 場所 ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Integrate() 場所 ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Run() ----------
現象としては、SVNからの取得でこけるのでCCNETのビルド自体が起動しなくなりますので、
一度 iconv.exeを通すのをやめるとビルドが動くようになります。
Iconf.exe のパラメータで標準入力のサイズを指定できるかもしれませんが、そこまで確認してません。
それと最新のCCNETを使えばSVNからの文字化けが無くなっているらしいので、そもそもiconv.exeを使う必要がないみたいです。