Package org.impalaframework.exception

Examples of org.impalaframework.exception.ConfigurationException


            else if (delegatingLoader != null) {
                if (logger.isDebugEnabled()) logger.debug("Loading module " + definition + " using DelegatingContextLoader " + moduleLoader);
                context = delegatingLoader.loadApplicationContext(parent, definition);
            }
            else {
                throw new ConfigurationException("No " + ModuleLoader.class.getName() + " or "
                        + DelegatingContextLoader.class.getName() + " specified for module definition type " + definition.getType());
            }

        }
        finally {
View Full Code Here


   
    public static final Log logger = LogFactory.getLog(ImpalaServletUtils.class);

    public static WebApplicationContext checkIsWebApplicationContext(String servletName, ApplicationContext applicationContext) {
        if (!(applicationContext instanceof WebApplicationContext)) {
            throw new ConfigurationException("Servlet '" + servletName + "' is not backed by an application context of type " + WebApplicationContext.class.getName() + ": " + applicationContext);
        }
        return (WebApplicationContext) applicationContext;
    }
View Full Code Here

    public static ModuleManagementFacade getModuleManagementFacade(ServletContext servletContext) {
        ModuleManagementFacade facade = WebServletUtils.getModuleManagementFacade(servletContext);
   
        if (facade == null) {
            throw new ConfigurationException("Unable to load " + FrameworkServletContextCreator.class.getName()
                    + " as no attribute '" + WebConstants.IMPALA_FACTORY_ATTRIBUTE
                    + "' has been set up. Have you set up your Impala ContextLoader correctly?");
        }
        return facade;
    }
View Full Code Here

        String attributeName = qualifier.getQualifiedAttributeName(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, applicationId, targetModuleName);
       
        WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext, attributeName);
       
        if (applicationContext == null) {
            throw new ConfigurationException("No root web application context associated with module '" + targetModuleName + "'");
        }
       
        final String beanName = getBeanName(request);
        final Object bean = applicationContext.getBean(beanName, Filter.class);
        if (!(bean instanceof Filter)) {
            throw new ConfigurationException("Delegate bean '" + beanName + "' from module '" + targetModuleName + "' is not an instance of " + Filter.class.getName());
        }
        return ObjectUtils.cast(bean, Filter.class);
    }
View Full Code Here

        ResourceLoader resourceLoader = getResourceLoader();
        Resource resource = resourceLoader.getResource(locationsResourceName);

        if (!resource.exists()) {
            throw new ConfigurationException("Module definition XML resource '" + resource.getDescription()
                    + "' does not exist");
        }

        return newModuleDefinitionSource(resource, factory);
    }
View Full Code Here

    if (context != null) {
      if (context instanceof WebApplicationContext) {
        return (WebApplicationContext) context;
      }
      else {
        throw new ConfigurationException("Module registered under name of servlet '" + servletName
            + "' needs to be an instance of " + WebApplicationContext.class.getName());
      }
    }
    else {
      throw new ConfigurationException("No module registered under the name of servlet '" + servletName + "'");
    }
  }
View Full Code Here

    public ModuleDefinitionSource getModuleDefinitionSource(ServletContext servletContext, ModuleManagementFacade factory) {

        Resource resource = getModulesResource(servletContext, factory);

        if (!resource.exists()) {
            throw new ConfigurationException("Module definition XML resource '" + resource.getDescription()
                    + "' does not exist");
        }

        return newModuleDefinitionSource(resource, factory);
    }
View Full Code Here

   
    private ModuleManagementFacade getFacade() {
        ModuleManagementFacade facade = (ModuleManagementFacade) servletContext
                .getAttribute(WebConstants.IMPALA_FACTORY_ATTRIBUTE);
        if (facade == null) {
            throw new ConfigurationException(
                    "No instance of "
                            + ModuleManagementFacade.class.getName()
                            + " found. Your context loader needs to be configured to create an instance of this class and attach it to the ServletContext using the attribue WebConstants.IMPALA_FACTORY_ATTRIBUTE");
        }
        return facade;
View Full Code Here

    private ModuleDefinitionSource getSource() {
        ModuleDefinitionSource source = (ModuleDefinitionSource) servletContext
                .getAttribute(WebConstants.MODULE_DEFINITION_SOURCE_ATTRIBUTE);
        if (source == null) {
            throw new ConfigurationException(
                    "No instance of "
                            + ModuleDefinitionSource.class.getName()
                            + " found. Your context loader needs to be configured to create an instance of this class and attach it to the ServletContext using the attribue WebConstants.MODULE_DEFINITION_SOURCE_ATTRIBUTE");

        }
View Full Code Here

        if (contextLoaderClassName != null) {
            try {
                contextLoaderClass = ClassUtils.forName(contextLoaderClassName, ClassUtils.getDefaultClassLoader());
            }
            catch (Throwable e) {
                throw new ConfigurationException("Unable to instantiate context loader class " + contextLoaderClassName);
            }
        }
       
        ContextLoader contextLoader = null;
        try {
View Full Code Here

TOP

Related Classes of org.impalaframework.exception.ConfigurationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.