Package org.geowebcache

Examples of org.geowebcache.GeoWebCacheException


        return params;
    }

    public void update(byte[] filterData, TileLayer layer, String gridSetId, int z)
            throws GeoWebCacheException {
        throw new GeoWebCacheException(
                "update(byte[] filterData, TileLayer layer, String gridSetId, int z) is not appropriate for WMSRasterFilters");
    }
View Full Code Here


        TMSDocumentFactory tdf = new TMSDocumentFactory(tld,gsb, base);
       
        String ret = null;
       
        if(paramsLength < 2) {
            throw new GeoWebCacheException("Path is too short to be a valid TMS path");
        } else if(paramsLength == 2) {
            String version = params[1];
            if(! version.equals("1.0.0")) {
                throw new GeoWebCacheException("Unknown version " + version + ", only 1.0.0 is supported.");
            } else {
                ret = tdf.getTileMapServiceDoc();
            }
        } else {
            String layerNameAndSRS = params[2];
View Full Code Here

    try {
      gsDispatcher.handleRequest(req, resp);
    } catch (Exception e) {
      log.fine(e.getMessage());

      throw new GeoWebCacheException(
          "Problem communicating with GeoServer" + e.getMessage());
    }

    if (actualResponse != null) {
      cookies = resp.getCachedCookies();
      for (Cookie c : cookies) {
        actualResponse.addCookie(c);
      }
    }

    if (super.mimeStringCheck(expectedMimeType, resp.getContentType())) {
      int responseCode = resp.getResponseCode();
      tileRespRecv.setStatus(responseCode);
      if (responseCode == 200) {
        byte[] bytes = resp.getBytes();
        try {
          target.transferFrom(Channels
              .newChannel(new ByteArrayInputStream(bytes)));
        } catch (IOException e) {
          throw new GeoWebCacheException(e);
        }
        Assert.isTrue(target.getSize() == bytes.length);
      } else if (responseCode == 204) {
        return;
      } else {
        throw new GeoWebCacheException(
            "Unexpected response from GeoServer for request "
                + wmsParams + ", got response code "
                + responseCode);
      }
    } else {
      log.severe("Unexpected response from GeoServer for request: "
          + wmsParams);

      throw new GeoWebCacheException(
          "Unexpected response from GeoServer for request "
              + wmsParams);
    }
  }
View Full Code Here

        for (Map.Entry<String, String[]> param: params.entrySet()) {
            String key = param.getKey();
            String value = param.getValue()[0];
            parameterMap.put(key, value);
            if("service".equalsIgnoreCase(key) && (value == null || value.isEmpty() || !"WMS".equalsIgnoreCase(value))) {
                throw new GeoWebCacheException("Failed to cascade request, service should be WMS but it was: '" + value + "'");
            }
        }
        if(!hasService) {
            parameterMap.put("service", "WMS");
        }
View Full Code Here

        Map<String, String> params = buildGetFeatureInfo(convTile, bbox, height, width, x, y);
        Resource response;
        try {
            response = GWC.get().dispatchOwsRequest(params, (Cookie[]) null);
        } catch (Exception e) {
            throw new GeoWebCacheException(e);
        }
        return response;
    }
View Full Code Here

                    map = dispatchGetMap(tile, metaTile);
                    checkNotNull(map, "Did not obtain a WebMap from GeoServer's Dispatcher");
                    metaTile.setWebMap(map);
                    saveTiles(metaTile, tile, requestTime);
                } catch (Exception e) {
                    throw new GeoWebCacheException("Problem communicating with GeoServer", e);
                }
            }
            /** ****************** Return lock and response ****** */
        } finally {
            if(lock != null) {
View Full Code Here

    @Override
    public ConveyorTile getNoncachedTile(ConveyorTile tile) throws GeoWebCacheException {
        try {
            return getMetatilingReponse(tile, false, 1, 1);
        } catch (IOException e) {
            throw new GeoWebCacheException(e);
        }
    }
View Full Code Here

    @Override
    public ConveyorTile doNonMetatilingRequest(ConveyorTile tile) throws GeoWebCacheException {
        try {
            return getMetatilingReponse(tile, true, 1, 1);
        } catch (IOException e) {
            throw new GeoWebCacheException(e);
        }
    }
View Full Code Here

    @Override
    public void proxyRequest(ConveyorTile tile) throws GeoWebCacheException {
        try {
            GWC.get().proxyOwsRequest(tile);
        } catch (Exception e) {
            throw new GeoWebCacheException("Failed to cascade request", e);
        }
    }
View Full Code Here

            @Override
            public void release() throws GeoWebCacheException {
                try {
                    lock.release();
                } catch (IllegalArgumentException trouble) {
                    throw new GeoWebCacheException(trouble);
                }
            }
            @Override
            public String toString() {
                return lock.toString();
View Full Code Here

TOP

Related Classes of org.geowebcache.GeoWebCacheException

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.