Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.ConfigurationRuntimeException


            {
                return loadClass(clsName, factory.getClass());
            }
            catch (ClassNotFoundException cex)
            {
                throw new ConfigurationRuntimeException(cex);
            }
        }

        if (defaultClass != null)
        {
            return defaultClass;
        }

        Class clazz = factory.getDefaultBeanClass();
        if (clazz == null)
        {
            throw new ConfigurationRuntimeException(
                    "Bean class is not specified!");
        }
        return clazz;
    }
View Full Code Here


        if (factoryName != null)
        {
            BeanFactory factory = (BeanFactory) beanFactories.get(factoryName);
            if (factory == null)
            {
                throw new ConfigurationRuntimeException(
                        "Unknown bean factory: " + factoryName);
            }
            else
            {
                return factory;
View Full Code Here

        {
            return new XMLPropertyListConfiguration(TEST_FILE);
        }
        catch (ConfigurationException cex)
        {
            throw new ConfigurationRuntimeException(cex);
        }
    }
View Full Code Here

        {
            return new PropertyListConfiguration(TEST_FILE);
        }
        catch (ConfigurationException cex)
        {
            throw new ConfigurationRuntimeException(cex);
        }
    }
View Full Code Here

            return copy;
        }
        catch (CloneNotSupportedException cex)
        {
            // should not happen
            throw new ConfigurationRuntimeException("Cannot clone " + getClass());
        }
    }
View Full Code Here

            FileSystem fs = ((FileSystemBased) configuration).getFileSystem();
            String uri = fs.getPath(null, configuration.getURL(), configuration.getBasePath(),
                configuration.getFileName());
            if (uri == null)
            {
                throw new ConfigurationRuntimeException("Unable to determine file to monitor");
            }
            return fsManager.resolveFile(uri);
        }
        catch (FileSystemException fse)
        {
            String msg = "Unable to monitor " + configuration.getURL().toString();
            log.error(msg);
            throw new ConfigurationRuntimeException(msg, fse);
        }
    }
View Full Code Here

        if (factoryName != null)
        {
            BeanFactory factory = (BeanFactory) beanFactories.get(factoryName);
            if (factory == null)
            {
                throw new ConfigurationRuntimeException(
                        "Unknown bean factory: " + factoryName);
            }
            else
            {
                return factory;
View Full Code Here

                    this.value = clazz;
                }
            }
            catch (Exception e)
            {
                throw new ConfigurationRuntimeException("Unable to create " + value, e);
            }

        }
View Full Code Here

                if (config.getRootNode().equals(node))
                {
                    return new XMLBeanDeclaration(config, node);
                }
            }
            throw new ConfigurationRuntimeException("Unable to match node for " + node.getName());
        }
    }
View Full Code Here

    private static void initProperty(Object bean, String propName, Object value)
            throws ConfigurationRuntimeException
    {
        if (!PropertyUtils.isWriteable(bean, propName))
        {
            throw new ConfigurationRuntimeException("Property " + propName
                    + " cannot be set on " + bean.getClass().getName());
        }

        try
        {
            BeanUtils.setProperty(bean, propName, value);
        }
        catch (IllegalAccessException iaex)
        {
            throw new ConfigurationRuntimeException(iaex);
        }
        catch (InvocationTargetException itex)
        {
            throw new ConfigurationRuntimeException(itex);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.ConfigurationRuntimeException

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.