You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ar <6a...@sneakemail.com> on 2003/04/16 17:21:48 UTC

NoClassDefFoundError extending xerces class

Tomcat 4.1.18
WSAD 5.0
NT4
TOPLink
keywords xml xerces NoClassDefFoundError endorsed ESOM TOPLink parsing

My application uses TOPLink, which does XML parsing using xerces, and creates a subclass of org.apache.xerces.domDocumentImpl. Loading this class yields a NoClassDefFoundError. I sort of understand the problem, which is that extension class is being loaded by the webapp loader but the parent class was loaded by the system class loader (I'm not sure why the webapp classLoader cant see the classes loaded by the system loader, I thought the webapp loader is a child of the system loader).

Anyway, the only workaround I have found, is to *move*, not copy, <tomcat>\common\endorsed\xercesImpl.jar and ...xmlParserAPIs.jar into my webapp lib folder. (The jars have to be in my webapp anyway in order to resolve compile time references).

This does not seem like a good solution since I am modifying the tomcat installation by removing the jars. (Also I am not even certain this is a tomcat-only problem - I think I had the same problem deploying my app to the WAS test server in WSAD(but this, for now, is hearsay)).

So my question is, what is the proper way to support an app like TOPLink which uses xerces and extends it's classes. I have checked the discussions in the archives and I have read about ESOM but I'm still not sure exactly how to set it up properly.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org