Package org.impalaframework.exception

Examples of org.impalaframework.exception.ConfigurationException


   
    if (exportNames == null) {
      exportNames = beanNames;
    } else {
      if (exportNames.length != beanNames.length) {
        throw new ConfigurationException("beanNames array length [" + beanNames.length + "] is not the same length as exportNames array [" + exportNames.length + "]");
      }
    }
   
    for (int i = 0; i < beanNames.length; i++) {
      Object service = beanFactory.getBean(beanNames[i]);
View Full Code Here


      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

   
    if (exportNames == null) {
      exportNames = beanNames;
    } else {
      if (exportNames.length != beanNames.length) {
        throw new ConfigurationException("beanNames array length [" + beanNames.length + "] is not the same length as exportNames array [" + exportNames.length + "]");
      }
    }
   
    for (int i = 0; i < beanNames.length; i++) {
      Object service = beanFactory.getBean(beanNames[i]);
View Full Code Here

      String type = getType(definitionElement);
   
      Properties properties = moduleProperties.get(name);
   
      if (properties == null) {
        throw new ConfigurationException("Resource '" + getResource() + "' contains no new properties for module '" + name +
            "'. Has this module been declared in the '" + ModuleElementNames.NAMES_ELEMENT + "' element?");
      }
     
      TypeReader typeReader = TypeReaderUtils.getTypeReader(typeReaders, type);
      typeReader.readModuleDefinitionProperties(properties, name, definitionElement);
View Full Code Here

      Set<String> set = new LinkedHashSet<String>();

      int colonIndex = beanSetList.indexOf(':');

      if (colonIndex < 0) {
        throw new ConfigurationException("Invalid beanset definition. Missing ':' from string '" + beanSetList
            + "' in '" + definition + "'");
      }

      String fileName = beanSetList.substring(0, colonIndex).trim();
      String propertyListString = beanSetList.substring(colonIndex + 1).trim();
View Full Code Here

public abstract class RootModuleDefinitionUtils {

  public static List<String> getProjectNameList(ModuleDefinition moduleDefinition) {
    if (!(moduleDefinition instanceof RootModuleDefinition)) {
      throw new ConfigurationException("Attempting to get root project names from module definition instance [" + moduleDefinition + "], an instance of " + moduleDefinition.getClass().getName() + ", which is not an instance of " + RootModuleDefinition.class.getName());
    }
 
    RootModuleDefinition rootModuleDefinition = (RootModuleDefinition) moduleDefinition;
    List<String> projectNameList = rootModuleDefinition.getRootProjectNames();
    return projectNameList;
View Full Code Here

public class TypeReaderUtils {

  public static TypeReader getTypeReader(Map<String, TypeReader> typeReaders, String typeName) {
    TypeReader typeReader = typeReaders.get(typeName.toLowerCase());
    if (typeReader == null) {
      throw new ConfigurationException("No " + TypeReader.class.getName() + " specified for type '" + typeName + "'");
    }
    return typeReader;
  }
View Full Code Here

    return resourceLoaders;
  }
 
  protected ClassLoaderFactory getClassLoaderFactory() {
    if (classLoaderFactory == null) {
      throw new ConfigurationException("No " + ClassLoaderFactory.class.getName() + " set. Check your definition for " + this.getClass().getName());
    }
    return classLoaderFactory;
  }
View Full Code Here

        Assert.notNull(servletContext);

        ModuleManagementFacade factory = (ModuleManagementFacade) servletContext
                .getAttribute(WebConstants.IMPALA_FACTORY_ATTRIBUTE);
        if (factory == 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");
        }

        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

    protected void initServletProperties(Servlet servlet) {
        super.initServletProperties(servlet);
        Assert.notNull(delegateServlet, "delegateServlet cannot be null");
       
        if (!(servlet instanceof InternalFrameworkIntegrationServlet)) {
            throw new ConfigurationException(servlet + " must be an instanceof " + InternalFrameworkIntegrationServlet.class.getName());
        }
       
        InternalFrameworkIntegrationServlet integrationServlet = (InternalFrameworkIntegrationServlet) servlet;
        integrationServlet.setDelegateServlet(delegateServlet);
    }
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.