You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Akhilesh (JIRA)" <ji...@apache.org> on 2017/06/20 15:33:00 UTC

[jira] [Resolved] (JCLOUDS-1312) aws-3 upload problem

     [ https://issues.apache.org/jira/browse/JCLOUDS-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Akhilesh resolved JCLOUDS-1312.
-------------------------------
       Resolution: Invalid
    Fix Version/s: 2.0.1

Turned out to be a issue with corporate firewall. Once I provided the proxy to jclouds then things came in line. Also, I was testing against unsupported AWS region.

Along with that, I changed my pom to as following.
{code:xml}
 <dependencies>
        <dependency>
            <groupId>org.apache.jclouds</groupId>
            <artifactId>jclouds-allblobstore</artifactId>
            <version>${jclouds-core.version}</version>
        </dependency>
    </dependencies>
{code}

> aws-3 upload problem
> --------------------
>
>                 Key: JCLOUDS-1312
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1312
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-blobstore
>    Affects Versions: 2.0.1
>         Environment: Linux, AWS-S3
>            Reporter: Akhilesh
>            Priority: Minor
>              Labels: s3
>             Fix For: 2.0.1
>
>
> There are two problems as such.
> Here is my pom.xml for jclouds related stuff.
> {code:xml}
> <dependency>
>                 <groupId>org.apache.jclouds</groupId>
>                 <artifactId>jclouds-all</artifactId>
>                 <version>${jclouds-all.version}</version>
>                 <exclusions>
>                     <exclusion>
>                         <artifactId>*</artifactId>
>                         <groupId>asm</groupId>
>                     </exclusion>
>                 </exclusions>
>             </dependency>
>             <dependency>
>                 <groupId>org.apache.jclouds.driver</groupId>
>                 <artifactId>jclouds-jsch</artifactId>
>                 <version>${jclouds-all.version}</version>
>             </dependency>
>             <dependency>
>                 <groupId>org.apache.jclouds</groupId>
>                 <artifactId>jclouds-core</artifactId>
>                 <version>${jclouds-all.version}</version>
>             </dependency>
>             <dependency>
>                 <groupId>org.apache.jclouds</groupId>
>                 <artifactId>jclouds-blobstore</artifactId>
>                 <version>${jclouds-all.version}</version>
>             </dependency>
> {code}
> If I use this dependencies in my project, then while uploading a file to s3, I get class not found exception as I get old version of guava (11.x) which does not even have {{reflect}} package.
> To sort this out, i explicitly add guava 19 and i am able to get past this problem. Next again when I am trying to upload a blob, I am getting 
> {code:java}
> Caused by: org.jclouds.http.HttpException: did not receive ETag
> 	at org.jclouds.http.functions.ParseETagHeader.apply(ParseETagHeader.java:45)
> 	at org.jclouds.http.functions.ParseETagHeader.apply(ParseETagHeader.java:32)
> 	at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
> 	at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
> 	at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
> 	at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)
> 	at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)
> 	at com.sun.proxy.$Proxy46.putObject(Unknown Source)
> 	at org.jclouds.s3.blobstore.S3BlobStore.putBlob(S3BlobStore.java:267)
> 	at org.jclouds.aws.s3.blobstore.AWSS3BlobStore.putBlob(AWSS3BlobStore.java:85)
> 	at org.jclouds.s3.blobstore.S3BlobStore.putBlob(S3BlobStore.java:246)
> {code}
> This is essentially how I am using jclouds
> {code:java}
> context = ContextBuilder.newBuilder(provider)
>                     .credentials(decriptedIdentity, decryptedCredentials)
>                     .buildView(BlobStoreContext.class);
>              blobStore.blobBuilder(keyFromFileID)
>             .payload(payload)
>             .contentLength(payload.size())
>             .build();
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)