nasa/mct — pull request #77 by VWoeltjen (2012-11-29 22:47:29+00:00)
Title: Change classpath handling to fix error in SVG rendering

SVG rendering in platform (static graphics) is currently failing - underlying cause is that necessary dependencies of Batik are not being found, even though they are present in bundle classpath. Apache Batik uses the context class loader to retrieve its XML parser, DOM-related classes, and so on; under Felix, the context class loader does not have access to the bundle classpath. I believe this issue emerged after the bundlization of platform (if unchanged, the context class loader is simply the application's classloader; prior to bundlization I believe there were more entries on the app classpath, which likely included the necessary dependencies from xml-apis and xerces)

Since SVG rendering is done on separate threads (provided by Batik), the resolution to the issue was to set the context class loader for these threads explicitly (to the one provided by Felix, which can find the dependencies that are bundled in the Batik wrapper) before starting them. Additionally, did some cleanup in relevant MANIFEST.MFs to trim out some unnecessary imports.