Package org.jets3t.service

Examples of org.jets3t.service.ServiceException


        // Release HTTP connection manually. This should already have been done by the
        // HttpMethodReleaseInputStream class, but you can never be too sure...
        releaseConnection(methodAndByteCount.getHttpResponse());

        if(handler.isErrorResponse()) {
            throw new ServiceException(
                    "Copy failed: Code=" + handler.getErrorCode() +
                            ", Message=" + handler.getErrorMessage() +
                            ", RequestId=" + handler.getErrorRequestId() +
                            ", HostId=" + handler.getErrorHostId());
        }
View Full Code Here


            }

            return (S3Object) uploadedObject;
        }
        catch(UnsupportedEncodingException e) {
            throw new ServiceException("Unable to determine name of object created with signed PUT", e);
        }
    }
View Full Code Here

                    httpMethod.getURI().getHost(),
                    httpMethod.getURI().getRawPath().substring(1),
                    s3Endpoint);
        }
        catch(UnsupportedEncodingException e) {
            throw new ServiceException("Unable to determine name of object created with signed PUT", e);
        }

        responseObject.replaceAllMetadata(ServiceUtils.cleanRestMetadataMap(
                map, this.getRestHeaderPrefix(), this.getRestMetadataPrefix()));
        responseObject.setMetadataComplete(true); // Flag this object as having the complete metadata set.
View Full Code Here

        String xml;
        try {
            xml = config.toXml();
        }
        catch(Exception e) {
            throw new ServiceException("Unable to build WebsiteConfig XML document", e);
        }

        performRestPut(bucketName, null, metadata, requestParameters,
                new StringEntity(xml, ContentType.create("text/plain", Constants.DEFAULT_ENCODING)),
                true);
View Full Code Here

        PartialObjectListing partialListing = fileComparer.buildObjectMapPartial(
            storageService, bucketName, rootObjectPath, priorLastKey,
            objectKeyToFilepathMap, !isBatchMode, forceMetadataDownload, isForce,
            md5GenerationProgressWatcher, serviceEventAdaptor);
        if (serviceEventAdaptor.wasErrorThrown()) {
            throw new ServiceException("Unable to build map of objects",
                serviceEventAdaptor.getErrorThrown());
        }
        md5GenerationProgressWatcher.resetWatcher();

        // Retrieve details from listing.
View Full Code Here

            } catch (IOException e) {
                if (log.isErrorEnabled()) {
                    log.error("Unable to close response InputStream up after XML parse failure", e);
                }
            }
            throw new ServiceException("Failed to parse XML document with handler "
                + handler.getClass(), t);
        }
    }
View Full Code Here

                } catch (IOException e) {
                    if (log.isErrorEnabled()) {
                        log.error("Unable to close response InputStream after failure sanitizing XML document", e);
                    }
                }
                throw new ServiceException("Failed to sanitize XML document destined for handler "
                    + handler.getClass(), t);
            }
            return sanitizedInputStream;
        }
    }
View Full Code Here

        if (adaptor.wasErrorThrown()) {
            Throwable thrown = adaptor.getErrorThrown();
            if (thrown instanceof ServiceException) {
                throw (ServiceException) thrown;
            } else {
                throw new ServiceException(thrown);
            }
        }
    }
View Full Code Here

                downloadPackages[i] = new DownloadPackage(objects[i], tempFile);
                originalObjectKeyNames[i] = objects[i].getName();
            }
        } catch (IOException e) {
            throw new ServiceException("Unable to create temporary file to store object data", e);
        }

        final List<StorageObject> objectList = new ArrayList<StorageObject>();
        StorageServiceEventAdaptor adaptor = new StorageServiceEventAdaptor() {
            @Override
View Full Code Here

                                        + ", for object key: " + object.getKey());
                                }
                            }
                        } else {
                            if (!hexMD5OfDownloadedData.equals(object.getETag())) {
                                throw new ServiceException("Mismatch between MD5 hash of downloaded data ("
                                    + hexMD5OfDownloadedData + ") and ETag returned by service ("
                                    + object.getETag() + ") for object key: "
                                    + object.getKey());
                            } else {
                                if (log.isDebugEnabled()) {
View Full Code Here

TOP

Related Classes of org.jets3t.service.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.