[jboss-dev-forums] [Design of POJO Server] - Re: Classloader problem with NamingRestartUnitTestCase

bstansberry@jboss.com do-not-reply at jboss.com
Tue Feb 5 15:30:46 EST 2008


Thanks. :)

Traced the problem so far to here in IntrospectionTypeInfoFactoryImpl:


  |    protected TypeInfo resolveComplexTypeInfo(ClassLoader cl, String name)
  |          throws ClassNotFoundException
  |    {
  |       if (cl == null)
  |          cl = Thread.currentThread().getContextClassLoader();
  | 
  |       Class clazz = Class.forName(name, false, cl);
  |       return getTypeInfo(clazz);
  |    }
  | 

Class.forName(name, false, cl) is returning a Class whose getClassLoader() returns the old classloader.  The classloader passed as the 'cl' param to Class.forName() is the correct one.  Class.forName(String, boolean, ClassLoader) just calls into native method forName0(String, boolean, ClassLoader)

Poking around continues...

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126747#4126747

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126747



More information about the jboss-dev-forums mailing list