jump to navigation

Cruise Control and Ant problems February 5, 2008

Posted by Phill in General J2EE.
Tags: , , ,
comments closed

I had a really weird problem with Cruise Control / ant today. It was coming out with an error like this:

2008-02-05 10:48:27,903 [Thread-79] WARN ScriptRunner - java.lang.RuntimeException
2008-02-05 10:48:27,904 [Thread-79] WARN ScriptRunner - at org.apache.tools.ant.Main.createLogger(ant-1.6.5.jar.so)
2008-02-05 10:48:27,904 [Thread-79] WARN ScriptRunner - at org.apache.tools.ant.Main.addBuildListeners(ant-1.6.5.jar.so)
2008-02-05 10:48:27,904 [Thread-79] WARN ScriptRunner - at org.apache.tools.ant.Main.runBuild(ant-1.6.5.jar.so)
2008-02-05 10:48:27,905 [Thread-79] WARN ScriptRunner - at org.apache.tools.ant.Main.startAnt(ant-1.6.5.jar.so)
2008-02-05 10:48:27,905 [Thread-79] WARN ScriptRunner - at org.apache.tools.ant.launch.Launcher.run(ant-launcher-1.6.5.jar.so)
2008-02-05 10:48:27,905 [Thread-79] WARN ScriptRunner - at org.apache.tools.ant.launch.Launcher.main(ant-launcher-1.6.5.jar.so)
2008-02-05 10:48:27,913 [Thread-76] INFO Project - Project xxx: idle
2008-02-05 10:48:27,913 [Thread-76] INFO ProjectController - xxxController: build progress event: idle
2008-02-05 10:48:27,913 [Thread-76] ERROR Project - exception attempting build in project xxx
net.sourceforge.cruisecontrol.CruiseControlException: ant logfile /usr/share/cruisecontrol/projects/xxx/log.xml does not exist.
at net.sourceforge.cruisecontrol.builders.AntBuilder.getAntLogAsElement(AntBuilder.java:388)
at net.sourceforge.cruisecontrol.builders.AntBuilder.build(AntBuilder.java:198)
at net.sourceforge.cruisecontrol.Schedule.build(Schedule.java:165)
at net.sourceforge.cruisecontrol.Project.build(Project.java:226)
at net.sourceforge.cruisecontrol.Project.execute(Project.java:149)
at net.sourceforge.cruisecontrol.ProjectConfig.execute(ProjectConfig.java:369)
at net.sourceforge.cruisecontrol.ProjectWrapper.run(ProjectWrapper.java:69)
at java.lang.Thread.run(Thread.java:534)

Aaaanyway. The cause of this turned out to be that I already had a version of Ant installed (1.6.5), using a CentOS RPM, which meant that the version deployed with Cruise Control (1.7.0) wasn’t actually running. I have no idea why that was, but removing the CentOS RPM seemed to work! I think it might have been something to do with using the native library (the ant-1.6.5.jar.so should have given it away really…)

Just another one of those ‘gotchas’ which might help someone else waste time trying to figure it out…