JDOMParseException with CruiseControl and Subversion

Filed under: CruiseControl — lars @ 03:50:07 am

I had some problems recently with a CruiseControl automated-build box I was setting up. Every time CruiseControl attempted to get a list of recent modifications from SVN, I got the following Exception:

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:547)
at net.sourceforge.cruisecontrol.sourcecontrols.SVN$SVNLogXMLParser.parseAndFilter(SVN.java:534)
at net.sourceforge.cruisecontrol.sourcecontrols.SVN.execHistoryCommand(SVN.java:454)
at net.sourceforge.cruisecontrol.sourcecontrols.SVN.getModifications(SVN.java:264)
at net.sourceforge.cruisecontrol.ModificationSet.retrieveModificationsAsElement(ModificationSet.java:276)
at net.sourceforge.cruisecontrol.Project.getModifications(Project.java:424)
at net.sourceforge.cruisecontrol.Project.build(Project.java:198)
... 26 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)

In my case, this was actually to do with time synchronisation between the SVN server and the CruiseControl box!

My CruiseControl box was running in VmWare on SuSe Linux, and the clock drifted *alot*. It seems the command-line SVN client for linux uses the local time as a cut-off 'svn log' command which returns the recent history. Somehow, this results in the XML output being truncated, and when CruiseControl tries to parse this truncated XML it gets the above parsing error. Setting up the NTP service on the linux instance for time synchronisation solved this issue.


No Comments for this post yet...

    Leave a comment

    Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>

    (Line breaks become <br />)
    (Set cookies for name, email & url)

    powered by  b2evolution