Package org.geowebcache

Examples of org.geowebcache.GeoWebCacheException


            throws GeoWebCacheException {
        try {
            saveMatrix(filterData, layer, gridSetId, z);
           
        } catch (IOException e) {
            throw new GeoWebCacheException(this.getName()
                    + " encountered an error while persisting matrix, " + e.getMessage());
        }
       
        try {
            super.setMatrix(layer, gridSetId, z, true);
        } catch (IOException e) {
            throw new GeoWebCacheException(this.getName()
                    + " encountered an error while loading matrix, " + e.getMessage());
        }
    }
View Full Code Here


    }

   
    public void update(TileLayer layer, String gridSetId, int zoomStart, int zoomStop)
            throws GeoWebCacheException {
        throw new GeoWebCacheException("TileLayer layer, String gridSetId, int z) is not appropriate for FileRasterFilters");
    }
View Full Code Here

            // boolean requestTiled = true;

            if (tile.getHint().equals("not_cached,not_metatiled")) {
                // requestTiled = false;
            } else if (!tile.getHint().equals("not_cached")) {
                throw new GeoWebCacheException("Hint " + tile.getHint() + " is not known.");
            }

            TileLayer tl = tld.getTileLayer(tile.getLayerId());

            if (tl == null) {
                throw new GeoWebCacheException("Unknown layer " + tile.getLayerId());
            }

            if (!tl.isCacheBypassAllowed().booleanValue()) {
                throw new GeoWebCacheException("Layer " + tile.getLayerId()
                        + " is not configured to allow bypassing the cache.");
            }

            tile.setTileLayer(tl);
            tl.getNoncachedTile(tile);
View Full Code Here

        if (tile.getHint() != null) {
            //boolean requestTiled = true;
            if (tile.getHint().equals("not_cached,not_metatiled")) {
                //requestTiled = false;
            } else if (!tile.getHint().equals("not_cached")) {
                throw new GeoWebCacheException("Hint " + tile.getHint() + " is not known.");
            }

            TileLayer tl = tld.getTileLayer(tile.getLayerId());

            if (tl == null) {
                throw new GeoWebCacheException("Unknown layer " + tile.getLayerId());
            }

            if(! tl.isCacheBypassAllowed().booleanValue()) {
                throw new GeoWebCacheException("Layer " + tile.getLayerId()
                        + " is not configured to allow bypassing the cache.");
            }
           
            tile.setTileLayer(tl);
            tl.getNoncachedTile(tile);
View Full Code Here

        try {
            getMethod = srcHelper.executeRequest(wmsUrl, requestParams, backendTimeout);

            if (getMethod.getStatusCode() != 200) {
                throw new GeoWebCacheException("Received response code "
                        + getMethod.getStatusCode() + "\n");
            }

            if (!getMethod.getResponseHeader("Content-Type").getValue().startsWith("image/")) {
                throw new GeoWebCacheException("Unexpected response content type "
                        + getMethod.getResponseHeader("Content-Type").getValue()
                        + " , request was " + urlStr + "\n");
            }

            byte[] ret = ServletUtils.readStream(getMethod.getResponseBodyAsStream(), 16384, 2048);

            InputStream is = new ByteArrayInputStream(ret);

            img = ImageIO.read(is);

        } finally {
            if (getMethod != null) {
                getMethod.releaseConnection();
            }
        }

        if (img.getWidth() != widthHeight[0] || img.getHeight() != widthHeight[1]) {
            String msg = "WMS raster filter has dimensions " + img.getWidth() + ","
                    + img.getHeight() + ", expected " + widthHeight[0] + "," + widthHeight[1]
                    + "\n";
            throw new GeoWebCacheException(msg);
        }

        return img;
    }
View Full Code Here

        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

        if (tile.getHint() != null) {
            //boolean requestTiled = true;
            if (tile.getHint().equals("not_cached,not_metatiled")) {
                //requestTiled = false;
            } else if (!tile.getHint().equals("not_cached")) {
                throw new GeoWebCacheException("Hint " + tile.getHint() + " is not known.");
            }

            TileLayer tl = tld.getTileLayer(tile.getLayerId());

            if (tl == null) {
                throw new GeoWebCacheException("Unknown layer " + tile.getLayerId());
            }
           
            if(! tl.isCacheBypassAllowed().booleanValue()) {
                throw new GeoWebCacheException("Layer " + tile.getLayerId()
                        + " is not configured to allow bypassing the cache.");
            }

            tile.setTileLayer(tl);
            tl.getNoncachedTile(tile);
View Full Code Here

                    Map<String, String> wmsParams, String expectedMimeType, Resource target)
                    throws GeoWebCacheException {
                numCalls++;
                switch (numCalls) {
                case 1:
                    throw new GeoWebCacheException("test exception");
                case 2:
                    throw new RuntimeException("test unexpected exception");
                case 3:
                    throw new GeoWebCacheException("second test exception");
                case 4:
                    throw new RuntimeException("second test unexpected exception");
                default:
                    try {
                        target.transferFrom(Channels.newChannel(new ByteArrayInputStream(
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.