Package org.vfny.geoserver.global

Examples of org.vfny.geoserver.global.ConfigurationException


            child = child.getNextSibling();
        }

        if (mandatory && (child == null)) {
            throw new ConfigurationException(root.getNodeName()
                + " does not contains a child element named " + name);
        }

        return null;
    }
View Full Code Here


        try {
            return Integer.parseInt(attValue);
        } catch (Exception ex) {
            if (mandatory) {
                throw new ConfigurationException(attName
                    + " attribute of element " + elem.getNodeName()
                    + " must be an integer, but it's '" + attValue + "'");
            } else {
                return defaultValue;
            }
View Full Code Here

            value = att.getValue();
        }

        if (mandatory) {
            if (att == null) {
                throw new ConfigurationException("element "
                    + elem.getNodeName()
                    + " does not contains an attribute named " + attName);
            } else if ("".equals(value)) {
                throw new ConfigurationException("attribute " + attName
                    + "in element " + elem.getNodeName() + " is empty");
            }
        }

        return value;
View Full Code Here

        } else {
            if (mandatory) {
                String msg = "Mandatory child " + childName + "not found in "
                    + " element: " + root;

                throw new ConfigurationException(msg);
            }

            return null;
        }
    }
View Full Code Here

                if (child.getNodeType() == Node.TEXT_NODE) {
                    value = child.getNodeValue();

                    if (mandatory && "".equals(value.trim())) {
                        throw new ConfigurationException(elem.getNodeName()
                            + " text is empty");
                    }

                    break;
                }
            }

            if (mandatory && (value == null)) {
                throw new ConfigurationException(elem.getNodeName()
                    + " element does not contains text");
            }
        } else {
            throw new ConfigurationException("Argument element can't be null");
        }

        return value;
    }
View Full Code Here

        if (value != null) {
            try {
                d = Double.parseDouble(value);
            } catch (NumberFormatException ex) {
                throw new ConfigurationException("Illegal attribute value for "
                    + attName + " in element " + elem.getNodeName()
                    + ". Expected double, but was " + value);
            }
        }
View Full Code Here

                //exception with the demo build target. ch
                if (getWFS(request).getValidation() != null) {
                    getWFS(request).getValidation().load(testSuites, plugins);
                }
            } else {
                throw new ConfigurationException(
                    "ValidationConfig experienced an error exporting Data Transpher Objects.");
            }
        } catch (ConfigurationException e) {
            e.printStackTrace();
            throw new ServletException(e);
View Full Code Here

    }
    String url = testDataUrl.toExternalForm();
    String testPath = url.substring("file:".length());
    dir = new File(testPath);
    if (!dir.exists() || !dir.isDirectory()) {
      throw new ConfigurationException(
          "Expected cite test dataset directory at " + dir);
    }

    Map dataStores = createDataStoresMap();
    dataDto.setDataStores(dataStores);
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.global.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.