ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject Preventing Parent Classloading
Date Thu, 09 Oct 2003 19:38:32 GMT
I'm working on a CocoonTask. Cocoon has a significant bundle of jars, 
some of which overlap with Ant's.

In my task, I set up a class loader responsible for loading Cocoon 
classes, which works, apart from when those same classes exist in Ant, 
when the Ant ones are loaded instead of Cocoon's.Ant has a different 
version of org.apache.log.Hierarchy which is incompatible with the one 
in Cocoon, and thus resulting in an IllegalAccessError.

To quote from the javadocs for ClassLoader:

"When requested to find a class or resource, a ClassLoader instance will 
delegate the search for the class or resource to its parent class loader 
before attempting to find the class or resource itself. "

How can I reverse this, so that the Cocoon ClassLoader is used in 
preference? Or prevent the delegation to the parent class loader?

Thanks in advance.

Regards, Upayavira

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

View raw message