ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Court Demas <>
Subject classloading in Java target
Date Thu, 01 Feb 2001 16:25:23 GMT
I'm having trouble using tomcat/apachesoap/xerces because of Ant's
classloading.  I think it's a classloading problem with the xml parsers
(ant vs xerces).

I'd like to add an option to ignore the already-loaded system classes
completely.  Otherwise there's always going to be differences between
running applications with ant than without.   Actually, I think this
should be the default behavior.  The only downside is an increase in
memory usage, but that's a small price to pay for correctness!

This issue comes up with servlet containers all the time.  Thus the
proposed Servlet 2.3 spec says (9.6.2 Web Application Classloader):

>9.6.2 Web Application Classloader The classloader that a container uses
>load a servlet in a WAR must not allow the WAR to override JDK or Java
>Servlet API classes, and is recommended not to allow Servlets in the WAR
>visibility of the web containers implementation classes. If a web
>container has a mechanism for exposing container-wide library JARs to
>application classloaders, it is recommended that the application
>classloader be implemented in such a way that classes packaged within the
>WAR are able to override classes residing in container-wide library JARs.

Jason Hunter touches upon this topic as well:

I'm willing to make the changes myself.  I wanted to get some feedback on
the idea first before hacking it in..


Get personalized email addresses from Yahoo! Mail - only $35 
a year!

View raw message