tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
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 <chris@christopherschultz.net>:
>
> 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.
>

+1.

Please remove any Tomcat/Catalina jars from there.

2014-03-29 3:41 GMT+04:00 Brendan Miller <catphive@catphive.net>:
> 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:
> http://tomcat.apache.org/tomcat-8.0-doc/appdev/build.xml.txt
>

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"
           classpathref="compile.classpath"/>


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:

http://tomcat.apache.org/tomcat-8.0-doc/appdev/processes.html#One-Time_Setup_of_Ant_and_Tomcat_for_Development

>> 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.

+1.

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


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message