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

Ramesh Gojji edited comment on JCLOUDS-1064 at 1/26/16 5:07 PM:
----------------------------------------------------------------

Apologies , I gave the wrong container when I tried above two. Here is full 
stack trace after correctiing the container name. I didn't realize the 
container name got deleted on the server . Sorry...

I am still getting NPE.

Onscreen Error : 

dom4j-1.6.1.jar
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:24)

Here is the jcloud.log

2016-01-26 08:56:22,347 DEBUG [org.jclouds.rest.internal.InvokeHttpMethod] 
[main] >> invoking AuthenticationApi.authenticateWithTenantNameAndCredentials
2016-01-26 08:56:22,350 DEBUG 
[org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Sending 
request 585637727: POST https://okckeystonestg1.company.com:5443/v2.0/tokens 
HTTP/1.1
2016-01-26 08:56:23,075 DEBUG 
[org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Receiving 
response 585637727: HTTP/1.1 200 OK
2016-01-26 08:56:23,107 DEBUG 
[org.jclouds.openstack.keystone.v2_0.suppliers.RegionIdToURIFromAccessForTypeAndVersion]
 [main] endpoints for apiType object-store and version 1: 
{RegionOne=[Endpoint{id=5dbcd479dd1b485bb7918c66f8e77ae3, region=RegionOne, 
publicURL=https://okcswiftstg1.company.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b,
 
internalURL=https://okcswiftstg1.company.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b,
 adminURL=https://okcswiftstg1.company.com:8443/}]}
2016-01-26 08:56:23,108 DEBUG 
[org.jclouds.location.suppliers.fromconfig.RegionIdsFromConfiguration] [main] 
no jclouds.regions configured for provider openstack-swift
2016-01-26 08:56:23,113 DEBUG 
[org.jclouds.location.suppliers.fromconfig.RegionIdsFromConfiguration] [main] 
no jclouds.regions configured for provider openstack-swift
2016-01-26 08:56:23,113 DEBUG 
[org.jclouds.location.suppliers.fromconfig.RegionIdsFromConfiguration] [main] 
no jclouds.regions configured for provider openstack-swift
2016-01-26 08:56:23,179 DEBUG [org.jclouds.rest.internal.InvokeHttpMethod] 
[main] >> invoking object:put
2016-01-26 08:56:23,180 DEBUG 
[org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Sending 
request 660680007: PUT 
https://okcswiftstg1.company.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b/Workload_Trace_Repository/dom4j-1.6.1.jar/slo/1453827383.156000/313898/33554432/00000001
 HTTP/1.1
2016-01-26 08:56:23,181 DEBUG [org.jclouds.http.internal.HttpWire] [main] over 
limit 313898/262144: wrote temp file
2016-01-26 08:56:25,325 DEBUG 
[org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Receiving 
response 1824649568: HTTP/1.1 100 Continue


Here is jclouds-wire.log

2016-01-26 08:56:22,350 DEBUG [jclouds.wire] [main] >> "Sensitive data in 
payload, use PROPERTY_LOGGER_WIRE_LOG_SENSITIVE_INFO override to enable logging 
this data."
2016-01-26 08:56:22,350 DEBUG [jclouds.headers] [main] >> POST 
https://okckeystonestg1.company.com:5443/v2.0/tokens HTTP/1.1
2016-01-26 08:56:22,350 DEBUG [jclouds.headers] [main] >> Accept: 
application/json
2016-01-26 08:56:22,350 DEBUG [jclouds.headers] [main] >> Content-Type: 
application/json
2016-01-26 08:56:22,350 DEBUG [jclouds.headers] [main] >> Content-Length: 120
2016-01-26 08:56:23,075 DEBUG [jclouds.headers] [main] << HTTP/1.1 200 OK
2016-01-26 08:56:23,075 DEBUG [jclouds.headers] [main] << Vary: 
X-Auth-Token,Accept-Encoding
2016-01-26 08:56:23,075 DEBUG [jclouds.headers] [main] << Date: Tue, 26 Jan 
2016 16:56:22 GMT
2016-01-26 08:56:23,075 DEBUG [jclouds.headers] [main] << Connection: close
2016-01-26 08:56:23,075 DEBUG [jclouds.headers] [main] << Server: Apache/2.2.15 
(CentOS)
2016-01-26 08:56:23,076 DEBUG [jclouds.headers] [main] << Content-Type: 
application/json
2016-01-26 08:56:23,076 DEBUG [jclouds.headers] [main] << Content-Length: 1267
2016-01-26 08:56:23,079 DEBUG [jclouds.wire] [main] << "{"access": {"token": 
{"issued_at": "2016-01-26T16:56:23.024016", "expires": "2016-01-27T16:56:23Z", 
"id": "07a912ba8fc246029239ab169ad28652", "tenant": {"description": null, 
"enabled": true, "id": "22b76e9063a5412090447ec669576f7b", "name": 
"okcswiftstg1wtr"}}, "serviceCatalog": [{"endpoints": [{"adminURL": 
"https://okcswiftstg1.company.com:8443/";, "region": "RegionOne", "internalURL": 
"https://okcswiftstg1.company.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b";,
 "id": "5dbcd479dd1b485bb7918c66f8e77ae3", "publicURL": 
"https://okcswiftstg1.company.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b"}],
 "endpoints_links": [], "type": "object-store", "name": "swift"}, {"endpoints": 
[{"adminURL": "https://okckeystonestg1.company.com:35443/v2.0";, "region": 
"RegionOne", "internalURL": "https://okckeystonestg1.company.com:5443/v2.0";, 
"id": "549a09b6840c4ff79a29b3412eb39dea", "publicURL": 
"https://okckeystonestg1.company.com:5443/v2.0"}], "endpoints_links": [], 
"type": "identity", "name": "keystone"}], "user": {"username": 
"okcswiftstg1wtr", "roles_links": [], "id": "okcswiftstg1wtr", "roles": 
[{"name": "swiftoperator"}], "name": "okcswiftstg1wtr"}, "metadata": 
{"is_admin": 0, "roles": ["c4ee9c642b6041659d4f5e71137457af"]}}}"
2016-01-26 08:56:23,181 DEBUG [jclouds.wire] [main] >> "PK[0x3][0x4][\n]"
2016-01-26 08:56:23,181 DEBUG [jclouds.wire] [main] >> "---DATA STRING REMOVED 
BECAUSE IT WAS TOO LONG---"
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> PUT 
https://okcswiftstg1.company.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b/Workload_Trace_Repository/dom4j-1.6.1.jar/slo/1453827383.156000/313898/33554432/00000001
 HTTP/1.1
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> Expect: 100-continue
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> Accept: 
application/json
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> X-Auth-Token: 
07a912ba8fc246029239ab169ad28652
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> Content-Type: 
application/octet-stream
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> Content-Length: 313898
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> Content-Disposition: 
attachment; filename=dom4j-1.6.1.jar
2016-01-26 08:56:25,325 DEBUG [jclouds.headers] [main] << HTTP/1.1 100 Continue
2016-01-26 08:56:25,326 DEBUG [jclouds.headers] [main] << Via: 1.1 
oktst1380.company.com:8443
2016-01-26 08:56:25,326 DEBUG [jclouds.headers] [main] << Content-Type: 
application/unknown
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "HTTP/1.1 201 
Created[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Date: Tue, 26 Jan 2016 
16:56:25 GMT[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Last-Modified: Tue, 26 
Jan 2016 16:56:25 GMT[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Content-Length: 
0[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Etag: 
4d8f51d3fe3900efc6e395be48030d6d[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Content-Type: 
text/html; charset=UTF-8[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "X-Trans-Id: 
tx3604638c72c14c3db4c80-0056a7a538[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Via: 1.1 
oktst1380.company.com:8443[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Vary: 
Accept-Encoding[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Connection: 
close[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "[\r][\n]"






was (Author: rgojji):
Apologies , I gave the wrong container when I tried above two. Here is full 
stack trace after correction . I am still getting NPE. Apologies for the messup.

Onscreen Error : 

dom4j-1.6.1.jar
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:24)

Here is the jcloud.log

2016-01-26 08:56:22,347 DEBUG [org.jclouds.rest.internal.InvokeHttpMethod] 
[main] >> invoking AuthenticationApi.authenticateWithTenantNameAndCredentials
2016-01-26 08:56:22,350 DEBUG 
[org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Sending 
request 585637727: POST https://okckeystonestg1.company.com:5443/v2.0/tokens 
HTTP/1.1
2016-01-26 08:56:23,075 DEBUG 
[org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Receiving 
response 585637727: HTTP/1.1 200 OK
2016-01-26 08:56:23,107 DEBUG 
[org.jclouds.openstack.keystone.v2_0.suppliers.RegionIdToURIFromAccessForTypeAndVersion]
 [main] endpoints for apiType object-store and version 1: 
{RegionOne=[Endpoint{id=5dbcd479dd1b485bb7918c66f8e77ae3, region=RegionOne, 
publicURL=https://okcswiftstg1.company.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b,
 
internalURL=https://okcswiftstg1.company.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b,
 adminURL=https://okcswiftstg1.company.com:8443/}]}
2016-01-26 08:56:23,108 DEBUG 
[org.jclouds.location.suppliers.fromconfig.RegionIdsFromConfiguration] [main] 
no jclouds.regions configured for provider openstack-swift
2016-01-26 08:56:23,113 DEBUG 
[org.jclouds.location.suppliers.fromconfig.RegionIdsFromConfiguration] [main] 
no jclouds.regions configured for provider openstack-swift
2016-01-26 08:56:23,113 DEBUG 
[org.jclouds.location.suppliers.fromconfig.RegionIdsFromConfiguration] [main] 
no jclouds.regions configured for provider openstack-swift
2016-01-26 08:56:23,179 DEBUG [org.jclouds.rest.internal.InvokeHttpMethod] 
[main] >> invoking object:put
2016-01-26 08:56:23,180 DEBUG 
[org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Sending 
request 660680007: PUT 
https://okcswiftstg1.company.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b/Workload_Trace_Repository/dom4j-1.6.1.jar/slo/1453827383.156000/313898/33554432/00000001
 HTTP/1.1
2016-01-26 08:56:23,181 DEBUG [org.jclouds.http.internal.HttpWire] [main] over 
limit 313898/262144: wrote temp file
2016-01-26 08:56:25,325 DEBUG 
[org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Receiving 
response 1824649568: HTTP/1.1 100 Continue


Here is jclouds-wire.log

2016-01-26 08:56:22,350 DEBUG [jclouds.wire] [main] >> "Sensitive data in 
payload, use PROPERTY_LOGGER_WIRE_LOG_SENSITIVE_INFO override to enable logging 
this data."
2016-01-26 08:56:22,350 DEBUG [jclouds.headers] [main] >> POST 
https://okckeystonestg1.company.com:5443/v2.0/tokens HTTP/1.1
2016-01-26 08:56:22,350 DEBUG [jclouds.headers] [main] >> Accept: 
application/json
2016-01-26 08:56:22,350 DEBUG [jclouds.headers] [main] >> Content-Type: 
application/json
2016-01-26 08:56:22,350 DEBUG [jclouds.headers] [main] >> Content-Length: 120
2016-01-26 08:56:23,075 DEBUG [jclouds.headers] [main] << HTTP/1.1 200 OK
2016-01-26 08:56:23,075 DEBUG [jclouds.headers] [main] << Vary: 
X-Auth-Token,Accept-Encoding
2016-01-26 08:56:23,075 DEBUG [jclouds.headers] [main] << Date: Tue, 26 Jan 
2016 16:56:22 GMT
2016-01-26 08:56:23,075 DEBUG [jclouds.headers] [main] << Connection: close
2016-01-26 08:56:23,075 DEBUG [jclouds.headers] [main] << Server: Apache/2.2.15 
(CentOS)
2016-01-26 08:56:23,076 DEBUG [jclouds.headers] [main] << Content-Type: 
application/json
2016-01-26 08:56:23,076 DEBUG [jclouds.headers] [main] << Content-Length: 1267
2016-01-26 08:56:23,079 DEBUG [jclouds.wire] [main] << "{"access": {"token": 
{"issued_at": "2016-01-26T16:56:23.024016", "expires": "2016-01-27T16:56:23Z", 
"id": "07a912ba8fc246029239ab169ad28652", "tenant": {"description": null, 
"enabled": true, "id": "22b76e9063a5412090447ec669576f7b", "name": 
"okcswiftstg1wtr"}}, "serviceCatalog": [{"endpoints": [{"adminURL": 
"https://okcswiftstg1.company.com:8443/";, "region": "RegionOne", "internalURL": 
"https://okcswiftstg1.company.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b";,
 "id": "5dbcd479dd1b485bb7918c66f8e77ae3", "publicURL": 
"https://okcswiftstg1.company.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b"}],
 "endpoints_links": [], "type": "object-store", "name": "swift"}, {"endpoints": 
[{"adminURL": "https://okckeystonestg1.company.com:35443/v2.0";, "region": 
"RegionOne", "internalURL": "https://okckeystonestg1.company.com:5443/v2.0";, 
"id": "549a09b6840c4ff79a29b3412eb39dea", "publicURL": 
"https://okckeystonestg1.company.com:5443/v2.0"}], "endpoints_links": [], 
"type": "identity", "name": "keystone"}], "user": {"username": 
"okcswiftstg1wtr", "roles_links": [], "id": "okcswiftstg1wtr", "roles": 
[{"name": "swiftoperator"}], "name": "okcswiftstg1wtr"}, "metadata": 
{"is_admin": 0, "roles": ["c4ee9c642b6041659d4f5e71137457af"]}}}"
2016-01-26 08:56:23,181 DEBUG [jclouds.wire] [main] >> "PK[0x3][0x4][\n]"
2016-01-26 08:56:23,181 DEBUG [jclouds.wire] [main] >> "---DATA STRING REMOVED 
BECAUSE IT WAS TOO LONG---"
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> PUT 
https://okcswiftstg1.company.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b/Workload_Trace_Repository/dom4j-1.6.1.jar/slo/1453827383.156000/313898/33554432/00000001
 HTTP/1.1
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> Expect: 100-continue
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> Accept: 
application/json
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> X-Auth-Token: 
07a912ba8fc246029239ab169ad28652
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> Content-Type: 
application/octet-stream
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> Content-Length: 313898
2016-01-26 08:56:23,407 DEBUG [jclouds.headers] [main] >> Content-Disposition: 
attachment; filename=dom4j-1.6.1.jar
2016-01-26 08:56:25,325 DEBUG [jclouds.headers] [main] << HTTP/1.1 100 Continue
2016-01-26 08:56:25,326 DEBUG [jclouds.headers] [main] << Via: 1.1 
oktst1380.company.com:8443
2016-01-26 08:56:25,326 DEBUG [jclouds.headers] [main] << Content-Type: 
application/unknown
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "HTTP/1.1 201 
Created[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Date: Tue, 26 Jan 2016 
16:56:25 GMT[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Last-Modified: Tue, 26 
Jan 2016 16:56:25 GMT[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Content-Length: 
0[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Etag: 
4d8f51d3fe3900efc6e395be48030d6d[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Content-Type: 
text/html; charset=UTF-8[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "X-Trans-Id: 
tx3604638c72c14c3db4c80-0056a7a538[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Via: 1.1 
oktst1380.company.com:8443[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Vary: 
Accept-Encoding[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "Connection: 
close[\r][\n]"
2016-01-26 08:56:25,420 DEBUG [jclouds.wire] [main] << "[\r][\n]"





> 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)

Reply via email to