1 Jan 2009 22:03
Re: [groovy-user] RootLoader for system class?
begin Alexander Veit quotation:
> > Mike Dillon wrote:
> > Hmm... It doesn't seem like the underlying problem has been addressed
> > here. The fact that Groovy isn't asking the system classloader to load
> > MBeanServerConnection before consulting its own classpath JARs seems
> > like a violation of the parent-first classloader contract.
>
> The JARs from lib/ are not in the classpath. So the root ClassLoader does
> not know them.
>
> It seems that they are being loaded by RootLoader according to the
> LoaderConfiguration defined in conf/groovy-starter.conf.
I understand that the "root ClassLoader" (system?) doesn't know about
the Groovy lib directory. My point is that MBeanServerConnection is a
class that is part of the JDK, regardless whether the mx4j JAR also has
it. Groovy's classloader should be asking the system classloader if it
knows about MBeanServerConnection before it ever tries to load the class
itself. On Java 5 and higher, this should result in the JDK copy of the
class being loaded in all cases, but it isn't.
-md
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
RSS Feed