Package org.apache.commons.configuration2.ex

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


            DocumentBuilder builder = createDocumentBuilder();
            builder.parse(new InputSource(reader));
        }
        catch (SAXException e)
        {
            throw new ConfigurationException("Validation failed", e);
        }
        catch (IOException e)
        {
            throw new ConfigurationException("Validation failed", e);
        }
        catch (ParserConfigurationException pce)
        {
            throw new ConfigurationException("Validation failed", pce);
        }
        finally
        {
            endWrite();
        }
View Full Code Here


        {
            instance.read(reader);
        }
        catch (IOException e)
        {
            throw new ConfigurationException(e);
        }
        reader.close();
    }
View Full Code Here

        {
            config.write(writer);
        }
        catch (IOException e)
        {
            throw new ConfigurationException(e);
        }
        return writer.toString();
    }
View Full Code Here

        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

    @Test
    public void testConfigurationChangedAutoSaveException()
            throws ConfigurationException
    {
        builder.save();
        EasyMock.expectLastCall().andThrow(new ConfigurationException());
        EasyMock.replay(builder);
        fireChangeEvent(false);
        EasyMock.verify(builder);
    }
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

            getNodeModel().mergeRoot(handler.getResultBuilder().createNode(),
                    null, null, null, this);
        }
        catch (Exception e)
        {
            throw new ConfigurationException(
                    "Unable to parse the configuration file", e);
        }
    }
View Full Code Here

            getModel().setRootNode(
                    config.getNodeModel().getNodeHandler().getRootNode());
        }
        catch (ParseException e)
        {
            throw new ConfigurationException(e);
        }
    }
View Full Code Here

        {
            throw cex;
        }
        catch (Exception ex)
        {
            throw new ConfigurationException(ex);
        }
    }
View Full Code Here

    {
        if (decl.isReload())
        {
            if (getReloadingBuilderClass() == null)
            {
                throw new ConfigurationException(
                        "No support for reloading for builder class "
                                + getBuilderClass());
            }
            return getReloadingBuilderClass();
        }
View Full Code Here

TOP

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