log.debug( msg + e );
log.error( msg + e );
    public Class findClass( String name ) throws ClassNotFoundException    {        byte[] classBytes = null;        NamingEnumeration defaultSearchContexts = null;        NamingEnumeration namingContexts = null;                ServerLdapContext defaultSearchContextsConfigContext = null;                try         {               try            {                defaultSearchContextsConfigContext =                     ( ServerLdapContext ) RootDSE.lookup( defaultSearchContextsConfig );            }            catch ( NamingException e )            {                log.debug( "No configuration data found for class loader default search contexts." );            }                        if ( defaultSearchContextsConfigContext != null )            {                defaultSearchContexts = defaultSearchContextsConfigContext                    .getAttributes( "", new String[] { "classLoaderDefaultSearchContext" } )                    .get( "classLoaderDefaultSearchContext" ).getAll();                                try                {                    classBytes = findClassInDIT( defaultSearchContexts, name );                                        log.debug( "Class " + name + " found under default search contexts." );                }                catch ( ClassNotFoundException e )                {                    log.debug( "Class " + name + " could not be found under default search contexts." );                }            }                        if ( classBytes == null )            {                namingContexts = RootDSE                    .getAttributes( "", new String[] { "namingContexts" } )                    .get( "namingContexts" ).getAll();                                classBytes = findClassInDIT( namingContexts, name );            }        }         catch ( NamingException e )         {            String msg = "Encountered JNDI failure while searching directory for class: " + name;            log.debug( msg + e );            throw new ClassNotFoundException( msg );        }        catch ( ClassNotFoundException e )        {            String msg = "Class " + name + " not found in DIT.";            log.debug( msg );            throw new ClassNotFoundException( msg );        }        finally        {            if ( defaultSearchContexts != null ) { try { defaultSearchContexts.close(); } catch( Exception e ) {} };            if ( namingContexts != null ) { try { namingContexts.close(); } catch( Exception e ) {} };        }                return defineClass( name, classBytes, 0, classBytes.length );    }