So, I ended up putting together a simple client, however I get the
following error.

SEVERE: Cannot retry after server error, command is not replayable:
[method=public abstract
com.google.common.util.concurrent.ListenableFuture
org.jclouds.openstack.swift.CommonSwiftAsyncClient.putObject(java.lang.String,org.jclouds.openstack.swift.domain.SwiftObject)[mycontainer,
[info=[contentDisposition=null, contentEncoding=null,
contentLanguage=null, contentLength=null, contentMD5=null,
contentType=application/unknown, expires=null]]], request=PUT
https://storage101.iad3.clouddrive.com/v1/MossoCloudFS_someUUID/mycontainer/my.file
HTTP/1.1]

My method is simply

        CloudFilesClient cloudFilesClient = ContextBuilder.newBuilder(PROVIDER)
                .credentials(username, apiKey).buildApi(CloudFilesClient.class);
        SwiftObject object = cloudFilesClient.newSwiftObject();
        object.getInfo().setName(FILENAME + SUFFIX);
        File f = new File("/tmp/my.file");
        try {
            FileInputStream fis = new FileInputStream(f);
            object.setPayload(fis); //input stream.
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }

        System.out.println(cloudFilesClient.putObject(CONTAINER, object));

Any ideas why rackspace may be rejecting my request?

On Mon, Jan 6, 2014 at 10:51 AM, Everett Toews
<[email protected]> wrote:
> That would be the BlobStore interface.
>
> Everett
>
>
> On Jan 6, 2014, at 9:12 AM, John D. Ament wrote:
>
>> Andrew,
>>
>> Yes, that definitely helps.
>>
>> if I wanted to use the non provider specific interface, would
>> SwiftClient be the right interface to use?
>>
>> John
>>
>> On Mon, Jan 6, 2014 at 12:54 AM, Andrew Gaul <[email protected]> wrote:
>>> On Sun, Jan 05, 2014 at 09:54:58PM -0500, John D. Ament wrote:
>>>> I'm trying to follow your example on BlobStore API, we're planning to
>>>> use RackSpace CloudFiles.  The file is here:
>>>> https://github.com/jclouds/jclouds-examples/blob/master/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudfiles/CloudFilesPublish.java
>>>>
>>>> However, when I pull in the example against 1.7, the RestContext shows
>>>> as deprecated.  What is the correct way to get the equivalent of this?
>>>> Probably starting from the BlobStore or BlobStoreContext.
>>>
>>> John, sorry we have changed some interfaces without updating all the
>>> calling code.  Does this pull request help:
>>>
>>> https://github.com/jclouds/jclouds-examples/pull/28
>>>
>>> Note that you should prefer the provider-agnostic BlobStore methods,
>>> unless you need to access provider-specific methods such as
>>> CloudFilesClient.enableCDN.
>>>
>>> --
>>> Andrew Gaul
>>> http://gaul.org/
>

Reply via email to