tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Jamison <>
Subject tc4: Context's ClassLoader load order
Date Thu, 30 Nov 2000 16:59:18 GMT
Hi, all,

The source for StandardLoader and StandardClassLoader
both mention that their search order is done according to
the order of calls to addRepository(), and parent loader
first, then child.

We have had problems installing a Xerces-dependent project
in WEB-INF/lib, along with a copy of xerces.jar.   Starting
a servlet with this dependency causes a "sealing violation,"
as the class loader is attempting to step out of bounds.

If the WEB-INF/classes and WEB-INF/lib directories
were inserted -before- the system repositories, would this not
insulate the web app from any Tomcat dependencies?  In
other words,  do a "leaf-first" repository search, thus allowing
overloads of the default classes.

Although the underlying URLClassLoader has only addURL(),
and nothing like insertURL(), the child classloader can certainly
be called before its parent.

Any ideas?

Bob Jamison
LinCom Corp.

View raw message