Hey guys. Took me a little while to track this one down. Hopefully I didn't miss
any threads where this one has already been discovered.

In building 4.0 from CVS, commons-digester was consistently not getting detected
by Ant. I tracked it down to the fact that digester depends on collections and
logging, but the <available> task only had commons-digester.jar in the
classpath. Appeneding commons-collections.jar and commons-logging.jar to the
classpath attrib for that task corrected the problem.

The specific reason the detection fails is that the Ant <available> task (in 1.5
at least) attempts to check that the specified class can be loaded, and it does
this by attempting to instantiate it through reflection. It uses a purposely
invalid constructor signature so that constructor code doesn't _really_ get
executed, but the static initializer does. Because the JVM can't resolve the
commons-collections and commons-logging imports at that point, it tosses a
ClassDefNotFoundError, which Ant then interprets as a class that cannot be
correctly loaded and reports available=false.

Since I'm not intimately familiar the Catalina build process as a whole, I'll
leave to someone who is to (hopefully :) verify my solution and do the commit.

- Christopher

/**
 * Pleurez, pleurez, mes yeux, et fondez vous en eau!
 * La moitie de ma vie a mis l'autre au tombeau.
 *
 * - Corneille
 */

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to