views:

178

answers:

2

I've installed the latest CruiseControl and PHPUnderControl, and followed all the directions. I get stuck at running "../../apache-ant-1.7.0/bin/ant checkout" and get the output below. Searching for the error on Google, it was suggested to add the JVM path to the Ant script, but this did not change anything.

Even "ant --version" outputs this error.

There seems to be no other java related issues on any other apps running.

Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.tools.ant.launch.Launcher
   at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
   at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
   at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.5.0.0)
   at __gcj_personality_v0 (/var/www/internal/cruisecontrol/cruisecontrol-bin-2.8.2/projects/mytrial/java.version=1.4.2)
   at __libc_start_main (/lib/tls/libc-2.3.4.so)
   at _Jv_RegisterClasses (/var/www/internal/cruisecontrol/cruisecontrol-bin-2.8.2/projects/mytrial/java.version=1.4.2)

I've updated Ant to 1.7.1 and the issue persists. I've also tried updating Java to 1.6, but after being installed it still reports as being 1.4.2.

Classpath was not the issue, and the Ant website explicitly says not to use CLASSPATH.

+1  A: 

One idea would be to try to add the ant.jar to the classpath. You should find the jar at apache-ant-1.7.0/lib/ant.jar. However, I have no idea how do you specify the classpath in PHPUnderControl -- I haven't seen that tool.

Grzegorz Oledzki
A: 

Using Java 1.6 resolved the issue. I had to modify /usr/sbin/alteratives to use the new version of Java.