jump to navigation

Cruise Control and Ant problems February 5, 2008

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

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…



1. Phil Labee - March 28, 2008

Phil, since you are knowledgeable about Cruise Control and Java performance testing, I thought you might be able to help me with a CC build that jumped from 50 minutes to 200 minutes with little code change to blame.

At first I thought it was due to auth delays when writing the 100 or so build artifacts to my web server for safe-keeping and distribution. The build machine is windows (since we’re compiling .NET code) and the repository is Linux. We had other auth problems, so this looked familiar. But now I’m using a windows machine for my build repository, so I think I’m avoiding the auth problem, but my builds are still killing me. I tried defragmenting the build machine hard drive, but I can’t afford the downtime.

Since CC is a java process, and mine calls Ant (which does all the compiling and packaging), I thought it might be quickest to profile these Java apps.

Any advice?

2. Phill - March 28, 2008

Hi Phil,

Is it possible to look in the Cruise Control logs and check the timestamps to see exactly what process is taking so long?

As you’re building .NET, have you considered using Cruise Control .NET, or is there a particular reason you’re using the Java version?

I haven’t really had problems with Cruise Control builds taking a long time but I think the first step is to check the log timestamps to see if anything is taking a long time, if not it’s probably worth checking CPU / Memory usage.

Also, how are you storing the artifacts – i.e. how are you publishing? Via a Windows Shared drive? Shared drives can be slow – try using FTP or something else. Or have them stored locally and use a scheduled script to kick them across to your artifacts server.

Hope some of this makes sense / helps!


3. banos - November 17, 2008

Hi Phill,

Just check the ant start script and take heed. The $HOME/.ant stuff is interesting… Bad ant, naughty ant.

I remove the system Ant package if using custom ant installations, like with CruiseControl. Otherwise you have to get into –noconfig.

Sorry comments are closed for this entry

%d bloggers like this: