Package org.apache.commons.configuration2.ex

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


        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

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

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

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

    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

        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

            {
                datasource = setUpDataSource();
            }
            catch (Exception ex)
            {
                throw new ConfigurationRuntimeException(
                        "Could not create data source", ex);
            }
        }
        return datasource;
    }
View Full Code Here

            TreeData current = structure.get();
            List<ImmutableNode> nodes =
                    resolver.resolveNodeKey(current.getRootNode(), key, current);
            if (nodes.size() != 1)
            {
                throw new ConfigurationRuntimeException(
                        "Key does not select a single node: " + key);
            }

            ImmutableNode parent = nodes.get(0);
            TreeData newData =
View Full Code Here

            URLStreamHandler handler = new VFSURLStreamHandler(path);
            return new URL(null, path.getURI(), handler);
        }
        catch (FileSystemException fse)
        {
            throw new ConfigurationRuntimeException("Could not parse basePath: " + basePath
                + " and fileName: " + file, fse);
        }
    }
View Full Code Here

    {
        parent.addProperty("tablespaces.tablespace.name", "default");
        parent.addProperty("tablespaces.tablespace(-1).name", "test");
        parent.addProperty("tables.table(0).var", "${brackets:x}");

        ConfigurationInterpolator interpolator = parent.getInterpolator();
        interpolator.registerLookup("brackets", new Lookup() {

            public String lookup(String key) {
                return "(" + key + ")";
            }
View Full Code Here

TOP

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