Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Web Start Xerces Issue(Issue with RCP and Xerces)
Web Start Xerces Issue [message #734180] Thu, 06 October 2011 23:46 Go to next message
Dylan McReynolds is currently offline Dylan McReynolds
Messages: 9
Registered: June 2011
Junior Member
I have an 3.6.2 RCP app that explicitly calls into Xerces XNI classes.

Launched through Eclipse, it works fine. When launched through WebStart, I get an error when my XNI code is called. Other XML parsing works fine (would not have started up if it didn't.)

DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.

I've tried adding property suggested here, but no luck. www.eclipse.org/forums/index.php/t/142863/

Can't figure out why it bahaves differently in WebStart.
Re: Web Start Xerces Issue [message #754125 is a reply to message #734180] Mon, 31 October 2011 23:02 Go to previous message
Dylan McReynolds is currently offline Dylan McReynolds
Messages: 9
Registered: June 2011
Junior Member
I think I've found the solution, but it's not pretty.

First, I think it's possible that the osgi.contextClassLoaderParent parameter is no longer supported in Helios. It was added in 3.2. Have thrown a debug line into my code where I'm setting up my Xerces instance.

System.out.println(Thread.currentThread().getContextClassLoader().toString());


No matter what I set the osgi.contextClassLoaderParent to (app, ext, boot, fwk, ccl), I get com.sun.jnlp.JNLPClassLoader from WebStart. When I launch the same app in Eclipse, I get org.eclipse.core.runtime.internal.adaptor.ContextFinder.

I believe this is the source of my problem. THe JNLPClassLoader is loading a version of Xerces that is in conflict with the version that my bundle is configured to run.

I can play a trick and pass a reference to the Eclipse classloader in, and set the context classloader on the thread, but that's pretty ugly:
Thread.currentThread().setContextClassLoader(_classLoader);


Am I correct that osgi.contextClassLoaderParent dropped out of Helios?
Previous Topic:cannot add view via Extension wizard
Next Topic:[SOLVED] HOWTO Pass data(parameters) between wizard pages
Goto Forum:
  


Current Time: Fri Sep 19 19:58:24 GMT 2014

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

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