Cruisecontrol svn: Item is not readable

fightingazaza@gmail.com · 2010年04月13日 · 0 次阅读

config.xml

build.xml


<!--delete dir="src"/-->



环境变量:ant_home,svn_home,jdk 都已配置好了

svn 权限也已设定,tortoiseSVN 也可正常访问,为什么 cruisecontrol 不可以?

把详细的 log 信息贴上来吧

这样有助于分析错误原因

antBuilderOutput.log

Buildfile: projects\rhis-common-1.0\build.xml ccAntProgress -- pull

BUILD FAILED D:\BuildServer\CruiseControl\projects\rhis-common-1.0\build.xml:6: Problem: failed to create task or type svn Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any / declarations have taken place.

Total time: 0 seconds

cruisecontrol.log

2010-04-13 13:18:21,375 [Thread-196] WARN SVN - svn: Item is not readable 2010-04-13 13:18:21,484 [Thread-192] ERROR SVN - Error executing svn log command svn log --non-interactive --xml -v -r '"{2010-04-13T02:44:57Z}":"{2010-04-13T05:18:21Z}"' --no-auth-cache --username xss --password xss svn://localhost/p1/common/src org.jdom.input.JDOMParseException: Error on line 3: XML document structures must start and end within the same entity. at org.jdom.input.SAXBuilder.build(SAXBuilder.java:468) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:851) at net.sourceforge.cruisecontrol.sourcecontrols.SVN$SVNLogXMLParser.parse(SVN.java:541) at net.sourceforge.cruisecontrol.sourcecontrols.SVN$SVNLogXMLParser.parseAndFilter(SVN.java:528) at net.sourceforge.cruisecontrol.sourcecontrols.SVN.execHistoryCommand(SVN.java:449) at net.sourceforge.cruisecontrol.sourcecontrols.SVN.getModifications(SVN.java:258) at net.sourceforge.cruisecontrol.ModificationSet.retrieveModificationsAsElement(ModificationSet.java:266) at net.sourceforge.cruisecontrol.Project.getModifications(Project.java:424) at net.sourceforge.cruisecontrol.Project.build(Project.java:198) at net.sourceforge.cruisecontrol.Project.execute(Project.java:147) at net.sourceforge.cruisecontrol.ProjectConfig.execute(ProjectConfig.java:404) at net.sourceforge.cruisecontrol.ProjectWrapper.run(ProjectWrapper.java:69) at java.lang.Thread.run(Thread.java:619) 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.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:453) ... 12 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.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:453) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:851) at net.sourceforge.cruisecontrol.sourcecontrols.SVN$SVNLogXMLParser.parse(SVN.java:541) at net.sourceforge.cruisecontrol.sourcecontrols.SVN$SVNLogXMLParser.parseAndFilter(SVN.java:528) at net.sourceforge.cruisecontrol.sourcecontrols.SVN.execHistoryCommand(SVN.java:449) at net.sourceforge.cruisecontrol.sourcecontrols.SVN.getModifications(SVN.java:258) at net.sourceforge.cruisecontrol.ModificationSet.retrieveModificationsAsElement(ModificationSet.java:266) at net.sourceforge.cruisecontrol.Project.getModifications(Project.java:424) at net.sourceforge.cruisecontrol.Project.build(Project.java:198) at net.sourceforge.cruisecontrol.Project.execute(Project.java:147) at net.sourceforge.cruisecontrol.ProjectConfig.execute(ProjectConfig.java:404) at net.sourceforge.cruisecontrol.ProjectWrapper.run(ProjectWrapper.java:69) at java.lang.Thread.run(Thread.java:619)

fighting 于 2010-4-13 13:26 发表
antBuilderOutput.log Buildfile: projects\rhis-common-1.0\build.xml ccAntProgress -- pull BUILD FAILED D:\BuildServer\CruiseControl\projects\rhis-common-1.0\build.xml:6: Problem: failed to create tas ... [/quote]

rhis-common-1.0\build.xml 这个 ant 构建脚本没有写正确。你在这个脚本里涉及到 svn 的部分没有通过,需要改。 D:\BuildServer\CruiseControl\projects\rhis-common-1.0\build.xml:6: Problem: failed to create task or type svn Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any / declarations have taken place.

我也找到是这儿的问题了,但是怎么改啊?

首先不要管 Cruisecontrol,你先把你的 build.xml 写好,调试通,再往 Cruisecontrol 里边加。

因为你已经在 Cruisecontrol 里边同步下来你这个项目的代码了,所以不用在 build.xml 文件里再次同步项目代码。

你可以在 build.xml 文件中去掉下面这个 target,试试


<!--delete dir="src"/-->



去掉了,还是报同样的错

cruisecontrol.log 中报错,antBuilderOutput.log 中没有了

2010-04-13 14:17:12,546 [main ] INFO Main - CruiseControl Version 2.8.3 Compiled on January 24 2010 2134 2010-04-13 14:17:12,578 [main ] INFO XMLConfigManager - reading settings from config file [D:\BuildServer\CruiseControl\config.xml] 2010-04-13 14:17:13,031 [main ] INFO CruiseControlController - projectName = [rhis-common-1.0] 2010-04-13 14:17:13,031 [main ] INFO XMLConfigManager - using settings from config file [D:\BuildServer\CruiseControl\config.xml] 2010-04-13 14:17:13,062 [main ] INFO Project - Project rhis-common-1.0 starting 2010-04-13 14:17:13,062 [main ] INFO Project - Project rhis-common-1.0: idle 2010-04-13 14:17:13,062 [Project rhis-common-1.0 thread] INFO Project - Project rhis-common-1.0 started 2010-04-13 14:17:13,078 [Project rhis-common-1.0 thread] INFO Project - Project rhis-common-1.0: next build in 5 minutes 2010-04-13 14:17:13,078 [Project rhis-common-1.0 thread] INFO Project - Project rhis-common-1.0: waiting for next time to build 2010-04-13 14:17:13,546 [main ] INFO CruiseControlControllerAgent - Starting HttpAdaptor with CC-Stylesheets 2010-04-13 14:17:13,578 [main ] INFO CruiseControlControllerAgent - starting httpAdaptor 2010-04-13 14:17:13,609 [main ] INFO CruiseControlControllerAgent - starting rmiRegistry 2010-04-13 14:17:13,750 [main ] INFO CruiseControlControllerAgent - starting connectorServer 2010-04-13 14:17:20,859 [BuildQueueThread] INFO BuildQueue - BuildQueue started 2010-04-13 14:17:26,515 [Thread-20] INFO ProjectController - rhis-common-1.0 Controller: forcing build 2010-04-13 14:17:26,515 [Project rhis-common-1.0 thread] INFO Project - Project rhis-common-1.0: in build queue 2010-04-13 14:17:26,515 [Project rhis-common-1.0 thread] INFO ProjectController - rhis-common-1.0 Controller: build progress event: in build queue 2010-04-13 14:17:26,515 [BuildQueueThread] INFO BuildQueue - now adding to the thread queue: rhis-common-1.0 2010-04-13 14:17:26,609 [Thread-22] INFO Project - Project rhis-common-1.0: bootstrapping 2010-04-13 14:17:26,609 [Thread-22] INFO ProjectController - rhis-common-1.0 Controller: build progress event: bootstrapping 2010-04-13 14:17:28,203 [Thread-24] INFO ScriptRunner - Buildfile: projects\rhis-common-1.0\build.xml 2010-04-13 14:17:28,890 [Thread-24] INFO ScriptRunner - 2010-04-13 14:17:28,890 [Thread-24] INFO ScriptRunner - compile: 2010-04-13 14:17:29,171 [Thread-24] INFO ScriptRunner - [javac] Compiling 1 source file to D:\BuildServer\CruiseControl\projects\rhis-common-1.0\target\classes 2010-04-13 14:17:30,312 [Thread-24] INFO ScriptRunner - 2010-04-13 14:17:30,312 [Thread-24] INFO ScriptRunner - jar: 2010-04-13 14:17:30,421 [Thread-24] INFO ScriptRunner - 2010-04-13 14:17:30,421 [Thread-24] INFO ScriptRunner - BUILD SUCCESSFUL 2010-04-13 14:17:30,421 [Thread-24] INFO ScriptRunner - Total time: 1 second 2010-04-13 14:17:30,531 [Thread-22] INFO AntBootstrapper - Bootstrap successful. 2010-04-13 14:17:30,656 [Thread-22] INFO SVNBootstrapper - Skipped '.' 2010-04-13 14:17:30,750 [Thread-22] INFO Project - Project rhis-common-1.0: checking for modifications 2010-04-13 14:17:30,765 [Thread-22] INFO ProjectController - rhis-common-1.0 Controller: build progress event: checking for modifications 2010-04-13 14:17:31,671 [Thread-28] WARN SVN - svn: Item is not readable 2010-04-13 14:17:31,781 [Thread-22] ERROR SVN - Error executing svn log command svn log --non-interactive --xml -v -r '"{2010-04-13T06:13:10Z}":"{2010-04-13T06:17:30Z}"' --no-auth-cache --username xss --password xss svn://localhost/p1/common/src org.jdom.input.JDOMParseException: Error on line 3: XML document structures must start and end within the same entity. at org.jdom.input.SAXBuilder.build(SAXBuilder.java:468) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:851) at net.sourceforge.cruisecontrol.sourcecontrols.SVN$SVNLogXMLParser.parse(SVN.java:541) at net.sourceforge.cruisecontrol.sourcecontrols.SVN$SVNLogXMLParser.parseAndFilter(SVN.java:528) at net.sourceforge.cruisecontrol.sourcecontrols.SVN.execHistoryCommand(SVN.java:449) at net.sourceforge.cruisecontrol.sourcecontrols.SVN.getModifications(SVN.java:258) at net.sourceforge.cruisecontrol.ModificationSet.retrieveModificationsAsElement(ModificationSet.java:266) at net.sourceforge.cruisecontrol.Project.getModifications(Project.java:424) at net.sourceforge.cruisecontrol.Project.build(Project.java:198) at net.sourceforge.cruisecontrol.Project.execute(Project.java:147) at net.sourceforge.cruisecontrol.ProjectConfig.execute(ProjectConfig.java:404) at net.sourceforge.cruisecontrol.ProjectWrapper.run(ProjectWrapper.java:69) at java.lang.Thread.run(Thread.java:619) 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.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:453) ... 12 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.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:453) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:851) at net.sourceforge.cruisecontrol.sourcecontrols.SVN$SVNLogXMLParser.parse(SVN.java:541) at net.sourceforge.cruisecontrol.sourcecontrols.SVN$SVNLogXMLParser.parseAndFilter(SVN.java:528) at net.sourceforge.cruisecontrol.sourcecontrols.SVN.execHistoryCommand(SVN.java:449) at net.sourceforge.cruisecontrol.sourcecontrols.SVN.getModifications(SVN.java:258) at net.sourceforge.cruisecontrol.ModificationSet.retrieveModificationsAsElement(ModificationSet.java:266) at net.sourceforge.cruisecontrol.Project.getModifications(Project.java:424) at net.sourceforge.cruisecontrol.Project.build(Project.java:198) at net.sourceforge.cruisecontrol.Project.execute(Project.java:147) at net.sourceforge.cruisecontrol.ProjectConfig.execute(ProjectConfig.java:404) at net.sourceforge.cruisecontrol.ProjectWrapper.run(ProjectWrapper.java:69) at java.lang.Thread.run(Thread.java:619) 2010-04-13 14:17:31,859 [Thread-22] INFO Project - Project rhis-common-1.0: No modifications found, build not necessary. 2010-04-13 14:17:31,859 [Thread-22] INFO Project - Project rhis-common-1.0: Building anyway, since build was explicitly forced. 2010-04-13 14:17:31,875 [Thread-22] INFO Project - Project rhis-common-1.0: now building 2010-04-13 14:17:31,875 [Thread-22] INFO ProjectController - rhis-common-1.0 Controller: build progress event: now building 2010-04-13 14:17:32,312 [Thread-30] INFO ScriptRunner - Buildfile: projects\rhis-common-1.0\build.xml 2010-04-13 14:17:32,937 [Thread-30] INFO ScriptRunner - ccAntProgress -- clean 2010-04-13 14:17:33,078 [Thread-30] INFO ScriptRunner - [delete] Deleting directory D:\BuildServer\CruiseControl\projects\rhis-common-1.0\target 2010-04-13 14:17:33,125 [Thread-30] INFO ScriptRunner - ccAntProgress -- compile 2010-04-13 14:17:33,125 [Thread-30] INFO ScriptRunner - [mkdir] Created dir: D:\BuildServer\CruiseControl\projects\rhis-common-1.0\target\classes 2010-04-13 14:17:33,265 [Thread-30] INFO ScriptRunner - [javac] Compiling 9 source files to D:\BuildServer\CruiseControl\projects\rhis-common-1.0\target\classes 2010-04-13 14:17:35,156 [Thread-30] INFO ScriptRunner - ccAntProgress -- sleep 2010-04-13 14:17:35,171 [Thread-30] INFO ScriptRunner - [echo] Sleeping for a while so you can see the build in the new dashboard

我改了 config.xml 中的如下地方:

去掉了 build.xml 中的 pull

现在可以 build 成功,日志中也显示查找到更新,没有报错,但是查看更新文件,并没有变。。。

fighting 于 2010-4-13 14:18 发表
cruisecontrol.log 中报错,antBuilderOutput.log 中没有了 2010-04-13 14:17:12,546 [main ] INFO Main - CruiseControl Version 2.8.3 Compiled on January 24 2010 2134 2010-04-13 14:17:12,578 [ ... [/quote]

2010-04-13 14:17:30,765 [Thread-22] INFO ProjectController - rhis-common-1.0 Controller: build progress event: checking for modifications 2010-04-13 14:17:31,671 [Thread-28] WARN SVN - svn: Item is not readable 2010-04-13 14:17:31,781 [Thread-22] ERROR SVN - Error executing svn log command svn log --non-interactive --xml -v -r '"{2010-04-13T06:13:10Z}":"{2010-04-13T06:17:30Z}"' --no-auth-cache --username xss --password xss svn://localhost/p1/common/src org.jdom.input.JDOMParseException: Error on line 3: XML document structures must start and end within the same entity.

这句话是不是说明你的 Cruisecontrol 的配置文件 还是 build.xml 这个文件有语法错误? 你到 Cruisecontrol 不同下来的代码的目录,直接运行 ant -f build.xml 看看有没有错误吧。先一步一步的排错。

1,config.xml 如下地方进行修改,不知道为什么,SVN:的路径就不行,必须要用 http 的

2,build.xml 中 svn 更新设置为如下:





你这里是有问题的。

你没发现 config.xml 和 build.xml 文件里面用的 svn 的验证信息不一样么? 一个用 http 方式访问,用的是 admin/admin 一个用的 svn 方式访问,用的是 xss/xss

所以还需要继续看看你这个问题到底是出现在哪里。

嗯,确实,试验过了...

把 config.xml 中的 SVN 去掉也是可以的,现改为如下:

<!--svnbootstrapper localWorkingCopy="projects/${project.name}" username="admin" password="admin"/-->

<!--modificationset quietperiod="5">

但是如果在 config.xml 中验证,要怎么验证,还是不会

需要 登录 后方可回复。