Package org.geoserver.platform

Examples of org.geoserver.platform.ServiceException


            }
           
        } catch (FactoryException fe) {
          LOGGER.log(Level.WARNING,
              "Error while getting EPSG code from FeatureType", fe);
          throw new ServiceException(fe);   
        } catch (IOException ioe) {
            LOGGER.log(Level.WARNING,
                "Error while writing featuretype '" + schema.getTypeName() + "' to shapefile.", ioe);
            throw new ServiceException(ioe);
        } finally {
            // close all writers, dispose all datastores, even if an exception occurs
            // during closeup (shapefile datastore will have to copy the shapefiles, that migh
            // fail in many ways)
            IOException stored = null;
            for (StoreWriter sw : writers.values()) {
                try {
                    sw.writer.close();
                    sw.dstore.dispose();
                } catch(IOException e) {
                    stored = e;
                }
            }
            // if an exception occurred make the world aware of it
            if(stored != null)
                throw new ServiceException(stored);
        }
       
        return shapefileCreated;
    }
View Full Code Here


            sfds.createSchema(schema);
        } catch (NullPointerException e) {
            LOGGER.warning(
                "Error in shapefile schema. It is possible you don't have a geometry set in the output. \n"
                + "Please specify a <wfs:PropertyName>geom_column_name</wfs:PropertyName> in the request");
            throw new ServiceException(
                "Error in shapefile schema. It is possible you don't have a geometry set in the output.");
        }
       
        try {
            if(schema.getCoordinateReferenceSystem() != null)
View Full Code Here

    public Object parse(String value) throws Exception {
        try {
            return XCQL.toFilterList(value);
        } catch (CQLException pe) {
            throw new ServiceException("Could not parse CQL filter list.", pe);
        }
    }
View Full Code Here

        double miny = bbox[1];
        double maxx = bbox[2];
        double maxy = bbox[3];
       
        if (minx > maxx) {
            throw new ServiceException("illegal bbox, minX: " + minx + " is "
                + "greater than maxX: " + maxx);
        }

        if (miny > maxy) {
            throw new ServiceException("illegal bbox, minY: " + miny + " is "
                + "greater than maxY: " + maxy);
        }

        //check for crs
        CoordinateReferenceSystem crs = null;
View Full Code Here

      long reqUS = -1;
        if (request.getUpdateSequence() != null) {
          try {
            reqUS = Long.parseLong(request.getUpdateSequence());
          } catch (NumberFormatException nfe) {
            throw new ServiceException("GeoServer only accepts numbers in the updateSequence parameter");
          }
        }
        long geoUS = wfs.getGeoServer().getGlobal().getUpdateSequence();
      if (reqUS > geoUS) {
        throw new ServiceException("Client supplied an updateSequence that is greater than the current sever updateSequence","InvalidUpdateSequence");
      }
      if (reqUS == geoUS) {
        throw new ServiceException("WFS capabilities document is current (updateSequence = " + geoUS + ")","CurrentUpdateSequence");
      }
    }
View Full Code Here

                gzipOut.finish();
                gzipOut.flush();
            }
        } catch (TransformerException gmlException) {
            String msg = " error:" + gmlException.getMessage();
            throw new ServiceException(msg, gmlException);
        }
    }
View Full Code Here

          remappedSchema);
         
        } catch (FactoryException fe) {
          LOGGER.log(Level.WARNING,
              "Error while getting EPSG code from FeatureType", fe);
          throw new ServiceException(fe);
        } catch (IOException ioe) {
            LOGGER.log(Level.WARNING,
                "Error while writing featuretype '" + schema.getTypeName() + "' to shapefile.", ioe);
            throw new ServiceException(ioe);
        } finally {
            if(dstore != null) {
                dstore.dispose();
            }
        }
View Full Code Here

            }
           
        } catch (FactoryException fe) {
          LOGGER.log(Level.WARNING,
              "Error while getting EPSG code from FeatureType", fe);
          throw new ServiceException(fe);   
        } catch (IOException ioe) {
            LOGGER.log(Level.WARNING,
                "Error while writing featuretype '" + schema.getTypeName() + "' to shapefile.", ioe);
            throw new ServiceException(ioe);
        } finally {
            // close all writers, dispose all datastores, even if an exception occurs
            // during closeup (shapefile datastore will have to copy the shapefiles, that migh
            // fail in many ways)
            IOException stored = null;
            for (StoreWriter sw : writers.values()) {
                try {
                    sw.writer.close();
                    sw.dstore.dispose();
                } catch(IOException e) {
                    stored = e;
                }
            }
            // if an exception occurred make the world aware of it
            if(stored != null)
                throw new ServiceException(stored);
        }
       
        return shapefileCreated;
    }
View Full Code Here

            sfds.createSchema(schema);
        } catch (NullPointerException e) {
            LOGGER.warning(
                "Error in shapefile schema. It is possible you don't have a geometry set in the output. \n"
                + "Please specify a <wfs:PropertyName>geom_column_name</wfs:PropertyName> in the request");
            throw new ServiceException(
                "Error in shapefile schema. It is possible you don't have a geometry set in the output.");
        }
       
        try {
            if(schema.getCoordinateReferenceSystem() != null)
View Full Code Here

            // delete the input and output directories
            IOUtils.delete(tempGS);
            IOUtils.delete(tempOGR);
        } catch (Exception e) {
            throw new ServiceException("Exception occurred during output generation", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.geoserver.platform.ServiceException

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.