[
https://issues.apache.org/jira/browse/JCLOUDS-1064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117542#comment-15117542
]
Ramesh Gojji commented on JCLOUDS-1064:
---------------------------------------
Zack,
You are right, I am no longer getting NPE (Null Pointer Exception). Very weird.
Could you please help? Shall I create a new JIRA?
SEVERE: Cannot retry after server error, command has exceeded retry limit 5:
[method=org.jclouds.openstack.swift.v1.features.ObjectApi.public abstract
java.lang.String
org.jclouds.openstack.swift.v1.features.ObjectApi.put(java.lang.String,org.jclouds.io.Payload)[dom4j-1.6.1.jar/slo/1453826750.822000/313898/33554432/00000001,
[content=true, contentMetadata=[cacheControl=null,
contentDisposition=attachment; filename=dom4j-1.6.1.jar, contentEncoding=null,
contentLanguage=null, contentLength=313898, contentMD5=null,
contentType=application/octet-stream, expires=null], written=false,
isSensitive=false]], request=PUT
https://server.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b/jclouds-example/dom4j-1.6.1.jar/slo/1453826750.822000/313898/33554432/00000001
HTTP/1.1]
Exception in thread "main" org.jclouds.http.HttpResponseException: command: PUT
https://server.com:8443/v1/AUTH_22b76e9063a5412090447ec669576f7b/jclouds-example/dom4j-1.6.1.jar/slo/1453826750.822000/313898/33554432/00000001
HTTP/1.1 failed with response: HTTP/1.1 502 Bad Gateway; content: [<!DOCTYPE
HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Bad Gateway</title>
</head><body>
<h1>Bad Gateway</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
</p>
</body></html>
]
at
org.jclouds.openstack.swift.v1.handlers.SwiftErrorHandler.handleError(SwiftErrorHandler.java:45)
at
org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:67)
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:136)
at
org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:105)
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.uploadMultipartPart(RegionScopedSwiftBlobStore.java:479)
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:69)
at JCloudTest.main(JCloudTest.java:19)
> 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)