"unexpect error while attempting to resolve a value from the context directive class ["
"Unexpect error while attempting to resolve a value from the context directive class ["
    Object getContextValue( ComponentHandler handler, String key ) throws ControlException    {        try        {            ComponentModel model = handler.getComponentModel();            ContextModel context = model.getContextModel();            Directive directive = context.getEntryDirective( key );            if( null == directive )            {                if( handler.getType().getContextDescriptor().getEntryDescriptor( key ).isOptional() )                {                    return null;                }                else                {                    final String error =                      "No solution defined for the context entry ["                       + key                      + "].";                    throw new ControlException( error );                }            }            else            {                //                // evaluate the directive                //                                if( directive instanceof Value )                {                    Map map = handler.getContextMap();                    ClassLoader classloader = handler.getClassLoader();                    Value value = (Value) directive;                    ClassLoader loader = Thread.currentThread().getContextClassLoader();                    try                    {                        Thread.currentThread().setContextClassLoader( classloader );                        return value.resolve( map, false );                    }                    catch( Exception ve )                    {                        final String error =                           "unexpect error while attempting to resolve a value from the context directive class ["                          + directive.getClass().getName()                           + "] assigned to context key ["                          + key                          + "] in the component ["                          + handler.getPath()                          + "].";                        throw new ControlException( error, ve );                    }                    finally                    {                        Thread.currentThread().setContextClassLoader( loader );                    }                }                else                {                    final String error =                      "Unsuppored context directive argument class: " + directive;                    throw new ControlException( error );                }            }        }        catch( UnknownKeyException e )        {            final String error =               "Internal error in controller due to a reference to an unknown context key.";            throw new ControlException( error, e );        }        catch( RemoteException e )        {            final String error =               "Resolution of the context entry ["               + key              + "] failed due to a remote exception.";            throw new ControlException( error, e );        }    }