jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramesh Gojji (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-1064) multipart upload throwing : NullPointerException: Null partETag
Date Thu, 11 Feb 2016 17:57:18 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-1064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143152#comment-15143152
] 

Ramesh Gojji commented on JCLOUDS-1064:
---------------------------------------

Andrew,

Apologies for late response, I was working with admins to make sure they have enabled SLO
correctly and running the swift python client from my env. Here is takeaway

1) When I upload using swift upload --use-slo container filename, file upload was successful
( very fast 10 sec 306 KB) 
2) When I tried the same thing using jClouds   blobStore.putBlob("Workload_Trace_Repository",
blob), I see file uploaded after 10 Mins, but it throws up an error (same as I showed up)

Here is the exception
-----------------------------
Exception in thread "main" org.jclouds.http.HttpResponseException: Error tapping line connecting
to PUT https://okcswiftdev1.company.com:8443/v1/AUTH_7966e66df1cc4eb6b826f703814c860f/Workload_Trace_Repository/dom4j-1.6.1.jar
HTTP/1.1
at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:118)
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.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
at com.sun.proxy.$Proxy64.put(Unknown Source)
at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.putBlob(RegionScopedSwiftBlobStore.java:247)
at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.putBlob(RegionScopedSwiftBlobStore.java:235)
at JCloudTest.<init>(JCloudTest.java:96)
at JCloudTest.main(JCloudTest.java:28)
Caused by: java.lang.RuntimeException: Error tapping line
at org.jclouds.logging.internal.Wire.copy(Wire.java:111)
at org.jclouds.logging.internal.Wire.input(Wire.java:119)
at org.jclouds.logging.internal.Wire.input(Wire.java:126)
at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:101)
... 10 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
at sun.security.ssl.InputRecord.read(InputRecord.java:480)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3053)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3047)
at com.google.common.io.ByteStreams.copy(ByteStreams.java:175)
at org.jclouds.logging.internal.Wire.copy(Wire.java:93)
... 13 more

Not sure what is going on?


-Thanks
Ramesh

> multipart upload throwing : NullPointerException: Null partETag
> ---------------------------------------------------------------
>
>                 Key: JCLOUDS-1064
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1064
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-blobstore
>    Affects Versions: 2.0.0
>            Reporter: Ramesh Gojji
>            Assignee: Zack Shoylev
>              Labels: openstack-swift
>
> I am trying to upload a file in chunks to the openstack-swift. Here is the snippet of
the code I am using to upload a file named dom4j-1.6.1.jar in chunks. 
> blobStore.putBlob("jclouds-example", blob) does work, but if I add multipart to the method,
then I get NullPointerException: Null partETag. 
> {code:java}
>               ByteSource payload = Files.asByteSource(tempFile);
> 	      Blob blob = blobStore.blobBuilder(objectName)
> 	          .payload(payload)
> 	          .contentDisposition("attachment; filename=dom4j-1.6.1.jar")
> 	          .contentMD5(payload.hash(Hashing.md5()))
> 	          .contentLength(payload.size())
> 	          .contentType(MediaType.OCTET_STREAM.toString())
> 	          .build();
>               System.out.println(blob.getMetadata().getName());
> 	      // Upload the Blob 
> 	      String eTag = blobStore.putBlob("jclouds-example", blob, multipart());
> {code}
> Exception Stacktrace:
> {noformat}
> Exception in thread "main" java.lang.NullPointerException: Null partETag
> 	at org.jclouds.blobstore.domain.AutoValue_MultipartPart.<init>(AutoValue_MultipartPart.java:20)
> 	at org.jclouds.blobstore.domain.MultipartPart.create(MultipartPart.java:29)
> 	at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.uploadMultipartPart(RegionScopedSwiftBlobStore.java:481)
> 	at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.putMultipartBlob(RegionScopedSwiftBlobStore.java:567)
> 	at org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.putBlob(RegionScopedSwiftBlobStore.java:244)
> 	at JCloudTest.<init>(JCloudTest.java:75)
> 	at JCloudTest.main(JCloudTest.java:26)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message