[kaffe] Eclipse and strange ClassCastException
Helmer Krämer
hkraemer@freenet.de
Mon Jul 7 06:48:01 2003
On 07 Jul 2003 12:39:04 +0200
Mark Wielaard <mark@klomp.org> wrote:
Hi,
> > From what I know about eclipse, I would assume that the
> > PlatformClassLoader should not be able to find that class,
> > should it?
>
> 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
hmm. That sure looks a little bit weird, but I think it's ok.
And it definitely worked before we implemented the AppClassLoader
stuff....
It finally turned out to be a bug in java.net.URLClassLoader:
java.net.URLClassLoader.findClass() tries to find the .class
file using findResource(). PlatformClassLoader.findResource()
however delegates the call to findResource() to the xmlClassLoader
which succeeds in loading that resource, which in turn causes
the PlatformClassLoader to succeed in loading that class :(
Fix is in CVS.
Next problem is a failure in System.arraycopy()....
Thanks,
Helmer