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

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

Zack & Andrew,

Atlast I got my admins work on an environment where SLO enabled and upload a 
file without multipart working. But when I enabled multipart option, I am 
getting following message.

Exception in thread "main" java.lang.NullPointerException
        at 
org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.putMultipartBlob(RegionScopedSwiftBlobStore.java:560)
        at 
org.jclouds.openstack.swift.v1.blobstore.RegionScopedSwiftBlobStore.putBlob(RegionScopedSwiftBlobStore.java:244)
        at JCloudTest.<init>(JCloudTest.java:111)
        at JCloudTest.main(JCloudTest.java:29)


Here is Env with SLO enabled
{"formpost": {}, "tempurl": {"methods": ["GET", "HEAD", "PUT"]}, "slo": 
{"max_manifest_segments": 1000, "min_segment_size": 1048576, 
"max_manifest_size": 2097152}, "staticweb": {}, "keystoneauth": {}, "swift": 
{"max_file_size": 5368709122, "account_listing_limit": 10000, "max_meta_count": 
90, "max_meta_value_length": 256, "container_listing_limit": 10000, "version": 
"1.13.1", "max_meta_name_length": 128, "max_object_name_length": 1024, 
"max_account_name_length": 256, "strict_cors_mode": true, 
"max_container_name_length": 256}}

Here is jclouds.log
2016-03-04 17:29:33,416 DEBUG [org.jclouds.rest.internal.InvokeHttpMethod] 
[main] >> invoking AuthenticationApi.authenticateWithTenantNameAndCredentials
2016-03-04 17:29:33,418 DEBUG 
[org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Sending 
request 585637727: POST https://okckeystonestg1.company.com:5443/v2.0/tokens 
HTTP/1.1
2016-03-04 17:29:36,584 DEBUG 
[org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Receiving 
response 585637727: HTTP/1.1 200 OK
2016-03-04 17:29:36,605 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-03-04 17:29:36,606 DEBUG 
[org.jclouds.location.suppliers.fromconfig.RegionIdsFromConfiguration] [main] 
no jclouds.regions configured for provider openstack-swift
2016-03-04 17:29:36,610 DEBUG 
[org.jclouds.location.suppliers.fromconfig.RegionIdsFromConfiguration] [main] 
no jclouds.regions configured for provider openstack-swift
2016-03-04 17:29:36,611 DEBUG 
[org.jclouds.location.suppliers.fromconfig.RegionIdsFromConfiguration] [main] 
no jclouds.regions configured for provider openstack-swift


Here is jclouds-wire.log
2016-03-04 17:29:33,418 DEBUG [jclouds.wire] [main] >> "Sensitive data in 
payload, use PROPERTY_LOGGER_WIRE_LOG_SENSITIVE_INFO override to enable logging 
this data."
2016-03-04 17:29:33,418 DEBUG [jclouds.headers] [main] >> POST 
https://okckeystonestg1.company.com:5443/v2.0/tokens HTTP/1.1
2016-03-04 17:29:33,418 DEBUG [jclouds.headers] [main] >> Accept: 
application/json
2016-03-04 17:29:33,418 DEBUG [jclouds.headers] [main] >> Content-Type: 
application/json
2016-03-04 17:29:33,418 DEBUG [jclouds.headers] [main] >> Content-Length: 120
2016-03-04 17:29:36,584 DEBUG [jclouds.headers] [main] << HTTP/1.1 200 OK
2016-03-04 17:29:36,584 DEBUG [jclouds.headers] [main] << Server: Apache/2.2.15 
(CentOS)
2016-03-04 17:29:36,584 DEBUG [jclouds.headers] [main] << Connection: close
2016-03-04 17:29:36,585 DEBUG [jclouds.headers] [main] << Vary: 
X-Auth-Token,Accept-Encoding
2016-03-04 17:29:36,585 DEBUG [jclouds.headers] [main] << Date: Sat, 05 Mar 
2016 01:29:36 GMT
2016-03-04 17:29:36,585 DEBUG [jclouds.headers] [main] << Content-Type: 
application/json
2016-03-04 17:29:36,585 DEBUG [jclouds.headers] [main] << Content-Length: 1267
2016-03-04 17:29:36,588 DEBUG [jclouds.wire] [main] << "{"access": {"token": 
{"issued_at": "2016-03-05T01:29:36.269105", "expires": "2016-03-06T01:29:36Z", 
"id": "d22d089fa6644f338b2071d989f2f459", "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"]}}}"


Please let me know the next step..


> 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