I am somewhat confused by the Tomcat 7 classloader and its documentation.
Here is my setting:
- using JRE7 for Tomcat
- have a common.loader setting which points to several lib directories which should be loaded
- have several webapps, one which does XML parsing
The webapp which does XML parsing runs fine on a "clean" Tomcat without the common.loader libs. One of the common.loader libs is xercesimpl2.jar. If this JAR is present, the webapp no longer works fine (it finds an implementation of GregorianCalendan in Xerces and prefers this over the JRE java.xml.datatype Class) - the webapp only works if the JRE class is found first.
Now according to the Tomcat documentation, the class lookup prio will be "bootstrap first, than webapp/classes, webapp/lib, then common.loader) Why does the webapp not work then, if it supposedly uses the JRE classes first (which I guess are loaded by the bootstrap loader)?
If I move the xercesimpl.jar to a webapp's lib folder, the XML-parsing webapp also works, I would however require the xercesimpl.jar to be loaded by the common loader.
Any help would be greatly appreciated.