On Fri, Feb 24, 2012 at 10:08 AM, Charles Oliver Nutter
<head...@headius.com> wrote:
>> Try java -verbose:class to see if it really loads twice.
>
> Sure, I'll see if I can come up with more information. Frustratingly,
> it only happens when running the full suite.

Ok, I do see it loading multiple times...but I'm not sure that's
unusual. JRuby's "ant test" runs four suites that each get their own
JRuby runtime. Those runtimes will end up re-compiling some of the
same Ruby code and loading it with "one shot" classloaders in each
case.

It seems like the MethodHandle logic at some low level is linking the
incoming class as though it were loaded from the bootstrap loader.

I noticed something else from the original error. It says that
MethodHandle (loaded from bootstrap) has a different instance of the
class than the classloader I'm creating it with. How can that be? The
class does not exist on disk and is never loaded except by my original
defineClass, which happens in a one-shot classloader that's a child of
the JRuby runtime's JRubyClassLoader, which is itself a child of the
system classloader.

- Charlie
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to