Package org.apache.commons.configuration.ex

Examples of org.apache.commons.configuration.ex.ConfigurationException


        Map<String, Object> params = getParameters();
        MultiFileBuilderParametersImpl multiParams =
                MultiFileBuilderParametersImpl.fromParameters(params, true);
        if (multiParams.getFilePattern() == null)
        {
            throw new ConfigurationException("No file name pattern is set!");
        }
        String fileName = fetchFileName(multiParams);

        FileBasedConfigurationBuilder<T> builder =
                getManagedBuilders().get(fileName);
View Full Code Here


            setFooterComment(extractComment(reader.getCommentLines(), 0, reader
                    .getCommentLines().size() - 1));
        }
        catch (IOException ioex)
        {
            throw new ConfigurationException(ioex);
        }
        finally
        {
            if (--loadCounter == 0)
            {
View Full Code Here

            writeComment(writer, getCanonicalFooterCooment(true));
            writer.flush();
        }
        catch (IOException ioex)
        {
            throw new ConfigurationException(ioex);
        }
    }
View Full Code Here

            try
            {
                URL url = locate(fs, null, resolved);
                if (url == null)
                {
                    throw new ConfigurationException("Could not locate "
                            + resolved);
                }
                InputStream is = fs.getInputStream(url);
                InputSource iSource = new InputSource(resolved);
                iSource.setPublicId(publicId);
View Full Code Here

    public synchronized ConfigurationBuilder<? extends Configuration> getNamedBuilder(
            String name) throws ConfigurationException
    {
        if (sourceData == null)
        {
            throw new ConfigurationException("Information about child builders"
                    + " has not been setup yet! Call getConfiguration() first.");
        }
        ConfigurationBuilder<? extends Configuration> builder =
                sourceData.getNamedBuilder(name);
        if (builder == null)
        {
            throw new ConfigurationException("Builder cannot be resolved: "
                    + name);
        }
        return builder;
    }
View Full Code Here

        if (fileParams != null)
        {
            return createXMLDefinitionBuilder(fileParams);
        }

        throw new ConfigurationException(
                "No builder for configuration definition specified!");
    }
View Full Code Here

            {
                SystemConfiguration.setSystemProperties(basePath, fileName);
            }
            catch (Exception ex)
            {
                throw new ConfigurationException(
                        "Error setting system properties from " + fileName, ex);
            }
        }
    }
View Full Code Here

            throws ConfigurationException
    {
        URL url = locate(locator);
        if (url == null)
        {
            throw new ConfigurationException("Could not locate: " + locator);
        }
        return url;
    }
View Full Code Here

            url = FileLocatorUtils.obtainFileSystem(locator).getURL(
                    locator.getBasePath(), fileName);
        }
        catch (MalformedURLException e)
        {
            throw new ConfigurationException(e);
        }

        if (url == null)
        {
            throw new ConfigurationException(
                    "Cannot locate configuration source " + fileName);
        }
        save(url, locator);
    }
View Full Code Here

                {
                    ((VerifiableOutputStream) out).verify();
                }
                catch (IOException e)
                {
                    throw new ConfigurationException(e);
                }
            }
        }
        finally
        {
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.ex.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.