[kaffe] Eclipse and strange ClassCastException

Mark Wielaard mark@klomp.org
Mon Jul 7 03:36:01 2003


Hi,

On Mon, 2003-07-07 at 11:25, Helmer Kr=E4mer wrote:
> the problem is that 'StandardParserConfiguration' is loaded by a
> PluginClassLoader and 'XMLParserConfiguration' is loaded by the
> PlatformClassLoader (the attached patch includes this info in the
> message of the ClassCastException).

Nice patch. Useful info when you are playing with complex classloader
hierarchies. (If you include it then I would only add the additional
information if the classloaders are actaully different.)

> From what I know about eclipse, I would assume that the
> PlatformClassLoader should not be able to find that class,
> should it?=20

Actually it should but it does so in a tricky way and then removes (!)
those classes again from the classloader.
This looks like it might be the same problem that IKVM.NET had:
http://weblog.ikvm.net/PermaLink.aspx/66
The workaround for IKVM.NET was to add the xmlParserAPIs.jar and
xercesImpl.jar to the bootclasspath but that doesn't work for kaffe.

Cheers,

Mark