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


        if (option != null) {
            try {
                value = Integer.valueOf(option);
            }
            catch (NumberFormatException e) {
                throw new ConfigurationException("Invalid value '" + option + "' for option '" + optionName + "'. Must be integer");
            }
        }
        return value != null ? value : defaultValue;
    }
View Full Code Here

    private String[] getModuleNames(Element root) {
        Element namesElement = DomUtils.getChildElementByTagName(root, ModuleElementNames.NAMES_ELEMENT);
       
        if (namesElement == null) {
            throw new ConfigurationException("Resource '" + getResource() + "' contains a non-empty '" + ModuleElementNames.NAMES_ELEMENT + "' element, which is illegal when using " + InternalModuleDefinitionSource.class.getSimpleName());
        }
       
        String value = namesElement.getTextContent();
        String[] moduleNames = StringUtils.tokenizeToStringArray(value, " ,\n\r", true, true);
        return moduleNames;
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 = typeReaderRegistry.getTypeReader(type);
            typeReader.readModuleDefinitionProperties(properties, name, definitionElement);
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++) {
            String beanName = beanNames[i];
View Full Code Here

    protected Document loadDocument(Resource resource) {
        try {
            return XMLDomUtils.loadDocument(resource);
        } catch (Exception e) {
            throw new ConfigurationException("Unable to load XML module definition document from resource " + resource, e);
        }
    }
View Full Code Here

            if (StringUtils.hasText(documentElement.getAttribute("xmlns"))) {
                XMLDomUtils.validateDocument(document, "moduledefinitions.xml document", xsd);
            }
            return document;
        } catch (Exception e) {
            throw new ConfigurationException("Unable to load XML module definition document from resource " + resource, e);
        }
    }
View Full Code Here

        return resources;
    }

    protected void checkResource(Resource resource, String location, ModuleDefinition moduleDefinition) {
        if (resource == null || !resource.exists())
            throw new ConfigurationException("Unable to load resource from location '" + location
                    + "' for module definition '" + moduleDefinition.getName() + "'");
    }
View Full Code Here

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

 
  /* ****************** protected methods ************** */
 
  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

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.