Package org.apache.cayenne

Examples of org.apache.cayenne.ConfigurationException


        try {
            conf = configurationClass.newInstance();
        }
        catch (Exception ex) {
            logObj.error("Error creating shared Configuration: ", ex);
            throw new ConfigurationException("Error creating shared Configuration."
                    + ex.getMessage(), ex);
        }

        Configuration.initializeSharedConfiguration(conf);
    }
View Full Code Here


     * {@link #didInitialize}.
     */
    public static void initializeSharedConfiguration(Configuration conf) {
        // check to see whether we can proceed
        if (!conf.canInitialize()) {
            throw new ConfigurationException("Configuration of class "
                    + conf.getClass().getName()
                    + " refused to be initialized.");
        }

        try {
            // initialize configuration
            conf.initialize();

            // call post-initialization hook
            conf.didInitialize();

            // set the initialized Configuration only after success
            Configuration.sharedConfiguration = conf;
        }
        catch (Exception ex) {
            throw new ConfigurationException(
                    "Error during Configuration initialization. " + ex.getMessage(),
                    ex);
        }
    }
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

    public ClientConnection get() throws ConfigurationException {

        String url = runtimeProperties.get(ClientModule.ROP_SERVICE_URL);
        if (url == null) {
            throw new ConfigurationException(
                    "No property defined for '%s', can't initialize HessianConnection",
                    ClientModule.ROP_SERVICE_URL);
        }

        String userName = runtimeProperties
View Full Code Here

        try {
            return Integer.parseInt(string);
        }
        catch (NumberFormatException e) {
            throw new ConfigurationException(
                    "Invalid int property '%s': '%s'",
                    propertyName,
                    string);
        }
    }
View Full Code Here

        if (dataSourceDescriptor == null) {
            String message = "Null dataSourceDescriptor for nodeDescriptor '"
                    + nodeDescriptor.getName()
                    + "'";
            logger.info(message);
            throw new ConfigurationException(message);
        }

        ConnectionLogger logger = new ConnectionLogger();
        try {
            return new PoolManager(
View Full Code Here

        try {
            conf = configurationClass.newInstance();
        }
        catch (Exception ex) {
            logObj.error("Error creating shared Configuration: ", ex);
            throw new ConfigurationException("Error creating shared Configuration."
                    + ex.getMessage(), ex);
        }

        Configuration.initializeSharedConfiguration(conf);
    }
View Full Code Here

     * {@link #didInitialize}.
     */
    public static void initializeSharedConfiguration(Configuration conf) {
        // check to see whether we can proceed
        if (!conf.canInitialize()) {
            throw new ConfigurationException("Configuration of class "
                    + conf.getClass().getName()
                    + " refused to be initialized.");
        }

        try {
            // initialize configuration
            conf.initialize();

            // call post-initialization hook
            conf.didInitialize();

            // set the initialized Configuration only after success
            Configuration.sharedConfiguration = conf;
        }
        catch (Exception ex) {
            throw new ConfigurationException(
                    "Error during Configuration initialization. " + ex.getMessage(),
                    ex);
        }
    }
View Full Code Here

        URL url = getResourceFinder().getResource(getDomainConfigurationName());
        try {
            return url != null ? url.openStream() : null;
        }
        catch (IOException e) {
            throw new ConfigurationException("Can't open config file URL: " + url, e);
        }
    }
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.