Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Classloader conflicts with JAXP in plugin using Xalan
Classloader conflicts with JAXP in plugin using Xalan [message #591554] Wed, 12 March 2003 22:49
Peter Nehrer is currently offline Peter NehrerFriend
Messages: 241
Registered: July 2009
Senior Member
Hi, I'm writing a search plugin that uses Xalan to perform some
transformations (during the course of the search). The actual
transformation is encapsulated in a class/method outside of the plugin
package (but is part of the plugin project and jar). Initially I
provided my own xalan.jar, xml-apis.jar, and xercesImpl.jar as a runtime
dependency. My unit test works fine (i.e., performs a transformation OK,
running as a standalone Java app using the same classpath as used by the
plugin). However, I get classloader exceptions trying to use it from
within my plugin; some of the JAXP classes are already loaded by the
classloader. Fine, I removed the conflicting classes from my
xml-apis.jar and got rid of xercesImpl.jar (which was also conflicting
w/ Xerces used by Eclipse). Now, however, Xalan reports validation
exceptions when loading the stylesheet (I suspect this version of Xalan
doesn't agree w/ the version of Xerces used by Eclipse).

Is there a way to avoid these conflicts? Can my plugin get a "private"
classloader and thus its own versions of these (JAXP and Xerces)
classes? Is this because the code that tries to do this is run from the
Search Dialog?

I'd appreciate if anyone could shed some light on this. What are the
Eclipse rules regarding class loaders? This topic is a nightmare in Ant,
especially in taskdefs dealing w/ XML/JAXP. Thank you!
--Peter
Previous Topic:How to use compiler provided with JDK 1.4.1_02 in Eclipse
Next Topic:Loading IMAGES into a "fragment" project
Goto Forum:
  


Current Time: Sat Dec 07 17:40:09 GMT 2024

Powered by FUDForum. Page generated in 0.03482 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top