Package org.apache.cayenne

Examples of org.apache.cayenne.ConfigurationException


            StringBuffer msg = new StringBuffer();
            msg.append("[").append(this.getClass().getName()).append(
                    "] : Domain configuration file \"").append(
                    this.getDomainConfigurationName()).append("\" is not found.");

            throw new ConfigurationException(msg.toString());
        }

        ConfigLoaderDelegate delegate = this.getLoaderDelegate();
        if (delegate == null) {
            delegate = new RuntimeLoadDelegate(this, this.getLoadStatus());
View Full Code Here


            try {
                // disable class indexing
                findDomain(domainName).getEntityResolver().setIndexedByClass(false);
            }
            catch (Exception ex) {
                throw new ConfigurationException("Domain is not loaded: " + domainName);
            }
        }
View Full Code Here

                    findDomain(domainName).getProperties().put(
                            DataDomain.DATA_CONTEXT_FACTORY_PROPERTY,
                            dataContextFactory);
                }
                catch (Exception ex) {
                    throw new ConfigurationException("Domain is not loaded: "
                            + domainName);
                }
            }
        }
View Full Code Here

        try {
            domain = findDomain(domainName);
        }
        catch (FindException ex) {
            logger.info("Error: Domain is not loaded: " + domainName);
            throw new ConfigurationException("Domain is not loaded: " + domainName);
        }

        domain.initWithProperties(properties);
    }
View Full Code Here

    }

    public void shouldLoadDataDomain(String domainName) {
        if (domainName == null) {
            logger.info("Error: unnamed <domain>.");
            throw new ConfigurationException("Domain 'name' attribute must be not null.");
        }

        logger.info("loaded domain: " + domainName);
        domains.put(domainName, new DataDomain(domainName));
    }
View Full Code Here

        try {
            domain = findDomain(domainName);
        }
        catch (FindException ex) {
            logger.info("Error: Domain is not loaded: " + domainName);
            throw new ConfigurationException("Domain is not loaded: " + domainName);
        }

        // load DataMaps tree
        for (String name : locations.keySet()) {
            DataMap map = domain.getMap(name);
View Full Code Here

     * loaded and linked with the DataDomain.
     */
    protected DataMap loadDataMap(DataDomain domain, String mapName, Map locations) {

        if (mapName == null) {
            throw new ConfigurationException("Error: <map> without 'name'.");
        }

        String location = (String) locations.get(mapName);

        if (location == null) {
            throw new ConfigurationException("Error: map '"
                    + mapName
                    + "' without 'location'.");
        }

        // load DataMap
View Full Code Here

                + "' factory='"
                + factory
                + "'>.");

        if (nodeName == null) {
            throw new ConfigurationException("Error: <node> without 'name'.");
        }

        factory = convertClassNameFromV1_2(factory);
        adapter = convertClassNameFromV1_2(adapter);

        if (dataSource == null) {
            logger.info("Warning: <node> '" + nodeName + "' has no 'datasource'.");
        }

        if (factory == null) {
            if (config.getDataSourceFactory() != null) {
                logger.info("Warning: <node> '" + nodeName + "' without 'factory'.");
            }
            else {
                throw new ConfigurationException("Error: <node> '"
                        + nodeName
                        + "' without 'factory'.");
            }
        }
View Full Code Here

    public void shouldLinkDataMap(String domainName, String nodeName, String mapName) {

        if (mapName == null) {
            logger.info("<map-ref> has no 'name'.");
            throw new ConfigurationException("<map-ref> has no 'name'.");
        }

        logger.info("loaded map-ref: " + mapName + ".");
        DataMap map = null;
        DataNode node = null;
View Full Code Here

                StringBuffer msg = new StringBuffer(128);
                msg.append("Load failures. Main configuration class: ");
                msg.append(config.getClass().getName());
                msg.append(", details: ");
                msg.append(status.describeFailures());
                throw new ConfigurationException(msg.toString());
            }
        }

        // load missing relationships and update configuration object
        for (DataDomain domain : getDomains().values()) {
View Full Code Here

TOP

Related Classes of org.apache.cayenne.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.