Package org.vfny.geoserver.global

Examples of org.vfny.geoserver.global.ConfigurationException


        //init this now so the rest of the config has correct log levels.
        try {
            GeoServer.initLogging(loggingLevel, loggingToFile,logLocation, context);
        } catch (IOException e) {
            throw new ConfigurationException(e);
        }

        LOGGER.config("logging level is " + loggingLevel);

        if (logLocation != null) {
View Full Code Here


                    serviceLevel = Integer.parseInt(serviceLevelValue);
                } catch (NumberFormatException nfe) {
                    String mesg = "Could not parse serviceLevel.  It "
                        + "should be one of Basic, Complete, or Transactional"
                        + " or else an integer value";
                    throw new ConfigurationException(mesg, nfe);
                }
            }
        } else { //TODO: this should probably parse the strings as well,
            serviceLevel = ReaderUtils.getIntAttribute(ReaderUtils
                    .getChildElement(wfsElement, "serviceLevel"), "value",
View Full Code Here

        try {
            s.setOnlineResource(new URL(ReaderUtils.getChildText(serviceRoot,
                        "onlineResource", true)));
        } catch (MalformedURLException e) {
            throw new ConfigurationException(e);
        }

        return s;
    }
View Full Code Here

        for (int i = 0; i < dsCnt; i++) {
            dsElem = (Element) dsElements.item(i);
            dsConfig = loadDataStore(dsElem);

            if (dataStores.containsKey(dsConfig.getId())) {
                throw new ConfigurationException("duplicated datastore id: "
                    + data.getNameSpaces().get(dsConfig.getNameSpaceId()));
            }

            dataStores.put(dsConfig.getId(), dsConfig);
        }
View Full Code Here

        if (data.getNameSpaces().containsKey(namespacePrefix)) {
            ds.setNameSpaceId(namespacePrefix);
        } else {
            String msg = "there is no namespace defined for datatasore '"
                + namespacePrefix + "'";
            throw new ConfigurationException(msg);
        }

        ds.setEnabled(ReaderUtils.getBooleanAttribute(dsElem, "enabled", false,
                true));
        ds.setTitle(ReaderUtils.getChildText(dsElem, "title", false));
View Full Code Here

            Reader reader = null;
            reader = new FileReader(infoFile);
            featureElem = ReaderUtils.loadConfig(reader);
            reader.close();
        } catch (FileNotFoundException fileNotFound) {
            throw new ConfigurationException("Could not read info file:"
                + infoFile, fileNotFound);
        } catch (Exception erk) {
            throw new ConfigurationException("Could not parse info file:"
                + infoFile, erk);
        }

        FeatureTypeInfoDTO dto = loadFeaturePt2(featureElem);
View Full Code Here

            reader = new FileReader(schemaFile);
            elem = ReaderUtils.loadConfig(reader);
            reader.close();
        } catch (FileNotFoundException e) {
            LOGGER.log(Level.FINEST, e.getMessage(), e);
            throw new ConfigurationException("Could not open schema file:"
                + schemaFile, e);
        } catch (Exception erk) {
            throw new ConfigurationException("Could not parse schema file:"
                + schemaFile, erk);
        }

        try {
            processSchema(elem, dto);
        } catch (ConfigurationException e) {
            throw new ConfigurationException("Error occured in " + schemaFile
                + "\n" + e.getMessage(), e);
        }
    }
View Full Code Here

                    try {
                        serializer.asDOMSerializer();
                        serializer.serialize(tmp);
                    } catch (IOException e) {
                        throw new ConfigurationException(e);
                    }

                    ati.setType(elem.toString());
                    ati.setComplex(true);
                }
View Full Code Here

            return configElem;
        } catch (IOException ioe) {
            String message = "problem reading file " + configFile + "due to: "
                + ioe.getMessage();
            LOGGER.warning(message);
            throw new ConfigurationException(message, ioe);
        } catch (ParserConfigurationException pce) {
            String message =
                "trouble with parser to read org.vfny.geoserver.global.xml, make sure class"
                + "path is correct, reading file " + configFile;
            LOGGER.warning(message);
            throw new ConfigurationException(message, pce);
        } catch (SAXException saxe) {
            String message = "trouble parsing XML in " + configFile + ": "
                + saxe.getMessage();
            LOGGER.warning(message);
            throw new ConfigurationException(message, saxe);
        }
    }
View Full Code Here

     *         the type specified.
     */
    public static File checkFile(File file, boolean isDir)
        throws ConfigurationException {
        if (!file.exists()) {
            throw new ConfigurationException("File does not exist: " + file);
        }

        if (isDir && !file.isDirectory()) {
            throw new ConfigurationException("File is not a directory:" + file);
        }

        if (!isDir && !file.isFile()) {
            throw new ConfigurationException("File is not valid:" + file);
        }

        LOGGER.finer("File is valid: " + file);

        return file;
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.