java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException

by Selva 2009-11-24 15:56:27

If you have a tomcat application server and if you are facing java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException error while running jsp or servlet then do the following steps :



1) Download apache-ant-1.7.1-bin.tar.gz
2) Extarct the tar.gz file by using the command tar-xzvf apache-ant-1.7.1-bin.tar.gz
3) cd apache-ant-1.7.1/lib
4) copy all ant related jar file to your tomcat's lib directory by using the following appropriate command:

For tomcat 5.X :

cp ant*.jar /usr/local/tomcat5/common/lib ( this is for tomcat5.X which is installed under /usr/local/ . If tomcat is installed in a NGASI environmant then you can use the command cp ant*.jar /home//appservers/apache-tomcat5.X/common/lib )

For tomcat 6.X :

cp ant*.jar /usr/local/tomcat6/common/lib ( this is for tomcat5 which is installed under /usr/local/ . If tomcat6 is installed in a NGASI environmant then you can use the command cp ant*.jar /home//apache-tomcat6.X/lib )



The above steps may slove you issue.I have tested and succeeded the above in NGASI environment.

Tagged in:

3007
like
0
dislike
0
mail
flag

You must LOGIN to add comments