java.lang.NoClassDefFoundError while using Ant
March 20th, 2009
Applies to:
Ant 1.6.x
Description:
Occurs while using Apache Ant.
Cause:
You have installed Ant 1.6.x and now get Exception in thread “main” java.lang.NoClassDefFoundError. The cause of this is that there is an old version of ant somewhere in the class path or configuration.
A version of this problem happens with jars that are in the classpath that include an embedded copy of ant classes. An example of this is some copies of weblogic.jar.
One can check if this is the case by doing (on unix/sh):
unset CLASSPATH
ant -version