tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: NoClassDefFoundError using catalina ant deploy task
Date Sat, 29 Mar 2014 15:34:12 GMT
2014-03-29 15:39 GMT+04:00 Christopher Schultz <>:
> Brendan,
> On 3/28/14, 8:51 PM, Brendan Miller wrote:
>> I investigated more and found the solution... It seems like a doc
>> bug in that the tutorial doesn't tell you everything you need to do
>> to get deploy to work.
>> tomcat-util.jar needs to be placed in ~/.ant/lib. The tutorial says
>> to place catalina-ant.jar there, but doesn't mention
>> tomcat-util.jar.
> You shouldn't have to copy either of these into ~/.ant/lib. Everything
> should be able to be accomplished by setting various class paths
> within the build script. I haven't tried to do this myself, but I'd be
> surprised if Ant required anything in a particular directory.


Please remove any Tomcat/Catalina jars from there.

2014-03-29 3:41 GMT+04:00 Brendan Miller <>:
> I was going through the tomcat docs and trying to use the default build.xml
> file provided by the appdev tutorial to deploy my war to tomcat.
> Example build.xml:

You missed this:

  <property name="catalina.home" value="../../../.."/> <!-- UPDATE THIS! -->

You have not configured catalina.home property. As such,
 <path id="compile.classpath">

was not created properly and taskdef using it failed,

  <taskdef resource="org/apache/catalina/ant/catalina.tasks"

Maybe one should add some sanity check (a <fail> task) for that property.

By the way,  the "deployer" download package of Tomcat includes quite
a number of libraries in its lib/ directory. It is not just those two.

>> The user needs the manager-script role for deploy to succeed. The
>> tutorial doesn't mention this.

Where did you look? My first glance, and I see that that is mentioned, here:

>> Overall the appdev tutorial is pretty problematic because it
>> doesn't really include a complete example and seems to have kind of
>> random organization.
> Patches are always welcome.


The tutorial needs good review and rewrite, but nobody has stepped up
for the task.

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message