Package org.impalaframework.exception

Examples of org.impalaframework.exception.ConfigurationException


            StringPropertyValue allLocations = new StringPropertyValue(propertySource, CoreBootstrapProperties.GRAPH_BEAN_VISIBILITY_TYPE, CoreBootstrapProperties.GRAPH_BEAN_VISIBILITY_TYPE_DEFAULT);
            configSettings.addProperty(CoreBootstrapProperties.GRAPH_BEAN_VISIBILITY_TYPE, allLocations);
        } else if ("hierarchical".equalsIgnoreCase(value)) {
            //nothing to do here
        } else {
            throw new ConfigurationException("Invalid value for property 'classloader.type': " + value);
        }
    }
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

                final Object bean = beanFactory.getBean(key);
                if (bean != null) {
                    try {
                        registry.addItem(registrationKey, bean);
                    } catch (ClassCastException e) {
                        throw new ConfigurationException("Bean '" + key + "' is not type compatible with " +
                                "registry bean '" + registryBeanName + "'");
                    }
                }
        }
    }
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

        //go through and check that all modules have children but not parents
        for (String moduleName : children.keySet()) {
           
            if (!parents.containsKey(moduleName)) {
                if (!loadDependendentModules) {
                    throw new ConfigurationException("Module '" + moduleName + "' has not been explicitly mentioned, but loadDependentModules has been set to false");
                }
                missing.add(moduleName);
            }
        }
        return missing.toArray(new String[0]);
View Full Code Here

        }
    }

    void checkParent(String parent, String moduleName) {
        if (moduleName.equals(parent)){
            throw new ConfigurationException("Module '" + moduleName + "' illegally declares itself as parent in " + MODULE_PROPERTIES);
        }
    }
View Full Code Here

            logger.error("Problem location resources for module: " + moduleName + ". Locations being searched are " + (classLocations.isEmpty() ? "empty": "listed next:"));
            for (Resource classLocation : classLocations) {
                logger.error(classLocation.getDescription() + (classLocation.exists() ? ": is present on file system": " cannot be found"));
            }
           
            throw new ConfigurationException("Application is using internally defined module structure, but no "
                    + MODULE_PROPERTIES +
                    " file is present on the classpath for module '" + moduleName
                    + "'. It must exist in one of the following locations: " + classLocations);
        }
        return resource;
View Full Code Here

                final Object bean = beanFactory.getBean(key);
                if (bean != null) {
                    try {
                        registry.addItem(registrationKey, bean);
                    } catch (ClassCastException e) {
                        throw new ConfigurationException("Bean '" + key + "' is not type compatible with " +
                                "registry bean '" + registryBeanName + "'");
                    }
                }
        }
    }
View Full Code Here

       
        if (getOrphans().isEmpty()) {
            if (moduleNames.length == 0) {
                return null;
            }
            throw new ConfigurationException("Module hierarchy does not have a root module. At least one module with no parent needs to be specified");
        }
       
        String firstModule = getOrphans().iterator().next();
        if (getOrphans().size() == 1) {
            return firstModule;
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.