Examples of ConfigurationRuntimeException


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

     */
    private void checkResultInstance(Object inst)
    {
        if (!getResultClass().isInstance(inst))
        {
            throw new ConfigurationRuntimeException(
                    "Incompatible result object: " + inst);
        }
    }
View Full Code Here

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

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

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

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

        {
            return factory.createBean(bcc);
        }
        catch (Exception ex)
        {
            throw new ConfigurationRuntimeException(ex);
        }
    }
View Full Code Here

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

            {
                return loadClass(clsName);
            }
            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

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

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

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

            BeanHelper.copyProperties(parameters, getSource());
        }
        catch (Exception e)
        {
            // Handle all reflection-related exceptions the same way
            throw new ConfigurationRuntimeException(e);
        }
    }
View Full Code Here

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

        {
            @Override
            public HierarchicalBuilderParametersImpl setExpressionEngine(
                    ExpressionEngine engine)
            {
                throw new ConfigurationRuntimeException("Test exception");
            }
        };

        CopyObjectDefaultHandler handler = new CopyObjectDefaultHandler(source);
        handler.initializeDefaults(dest);
View Full Code Here

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

    private TrackedNodeData getTrackedNodeData(NodeSelector selector)
    {
        TrackedNodeData trackData = trackedNodes.get(selector);
        if (trackData == null)
        {
            throw new ConfigurationRuntimeException("No tracked node found: "
                    + selector);
        }
        return trackData;
    }
View Full Code Here

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

        else
        {
            ImmutableNode target = selector.select(root, resolver, handler);
            if (target == null)
            {
                throw new ConfigurationRuntimeException(
                        "Selector does not select unique node: " + selector);
            }
            return new TrackedNodeData(target);
        }
    }
View Full Code Here

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

            {
                datasource = setUpDataSource();
            }
            catch (Exception ex)
            {
                throw new ConfigurationRuntimeException(
                        "Could not create data source", ex);
            }
        }
        return datasource;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.