Brett Chatman

Greenhorn
+ Follow
since Jan 15, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Brett Chatman

OMG that was it. Thank you so much! I have been completely frustrated by this for the past 2 months and had just about given up on ant/tomcat ever running on my box.

Thanks a million.
13 years ago
I agree that it probably is a classloader problem, but I have no idea what to do about it. I tried what you said, and put the catalina-ant.jar in my CLASSPATH variable ( I am running windows 7 64 bit ), but I got the same error. I also tried removing catalina-ant from tomcat's lib folder, but more of the same.

Any more suggestions/ideas would be much appreciated.

I don't know if this will be helpful or not, but my TOMCAT_HOME/lib folder looks like this:

annotations-api.jar
catalina-ant.jar
catalina-ha.jar
catalina-tribes.jar
catalina.jar
ecj-3.6.jar
el-api.jar
jasper-el.jar
jasper.jar
jsp-api.jar
servlet-api.jar
tomcat-api.jar
tomcat-coyote.jar
tomcat-dbcp.jar
tomcat-i18n-es.jar
tomcat-i18n-fr.jar
tomcat-i18n-ja.jar
tomcat-util.jar

And my ANT_HOME/lib directory looks like so:

ant-antlr.jar
ant-antlr.pom
ant-apache-bcel.jar
ant-apache-bcel.pom
ant-apache-bsf.jar
ant-apache-bsf.pom
ant-apache-log4j.jar
ant-apache-log4j.pom
ant-apache-oro.jar
ant-apache-oro.pom
ant-apache-regexp.jar
ant-apache-regexp.pom
ant-apache-resolver.jar
ant-apache-resolver.pom
ant-apache-xalan2.jar
ant-apache-xalan2.pom
ant-commons-logging.jar
ant-commons-logging.pom
ant-commons-net.jar
ant-commons-net.pom
ant-jai.jar
ant-jai.pom
ant-javamail.jar
ant-javamail.pom
ant-jdepend.jar
ant-jdepend.pom
ant-jmf.jar
ant-jmf.pom
ant-jsch.jar
ant-jsch.pom
ant-junit.jar
ant-junit.pom
ant-junit4.jar
ant-junit4.pom
ant-launcher.jar
ant-launcher.pom
ant-netrexx.jar
ant-netrexx.pom
ant-parent.pom
ant-swing.jar
ant-swing.pom
ant-testutil.jar
ant-testutil.pom
ant.jar
ant.pom
libraries.properties

I don't know if there might be two instances of the InstallTask class or something?
13 years ago
Hey I am having this same issue (I also happen to be going through the Spring tutorial).

Tomcat is located at C:/dev/apache-tomcat-7.0.5, ant is at C:/dev/ant, and my application is c:/dev/springapp.


My build.properties file looks like this:

appserver.home=C:/dev/apache-tomcat-7.0.5

appserver.lib=${appserver.home}/lib

deploy.path=${appserver.home}/webapps

tomcat.manager.url=http://localhost:8080/manager
tomcat.manager.username=tomcat
tomcat.manager.password=s3cret



And the relevant part of my build.xml file is:




but when I go to c:/dev/springapp and run the ant command, I keep getting following error:

BUILD FAILED
c:\dev\springapp\build.xml:85: taskdef class org.apache.catalina.ant.InstallTask cannot be found
using the classloader AntClassLoader[C:\dev\apache-tomcat-7.0.5\lib\catalina-ant.jar]


Which is perplexing, since C:\dev\apache-tomcat-7.0.7\lib\catalina-ant.jar is the exact path to my catalina-ant jar.


Does anyone have any idea why this might be happening???
13 years ago