Sending SetObjectRetentionRequest doesn't work
Whenever I send a SetObjectRetentionRequest, I get an error saying the content is empty:
com.emc.object.s3.S3Exception: This happens when the user sends an empty xml document as a request. The error message is, "Request body is empty." at com.emc.object.s3.jersey.ErrorFilter.parseErrorResponse(ErrorFilter.java:134) at com.emc.object.s3.jersey.ErrorFilter.handle(ErrorFilter.java:69) at com.emc.object.s3.jersey.RetryFilter.handle(RetryFilter.java:65) ...
Here's my code:
public void putRetentionTimeOnObjectEcm(String bucket, String key, Date date){
var request = new com.emc.object.s3.request.SetObjectRetentionRequest(bucket,key)
.withRetention(new com.emc.object.s3.bean.ObjectLockRetention()
.withMode(com.emc.object.s3.bean.ObjectLockRetentionMode.GOVERNANCE)
.withRetainUntilDate(date));
ecmS3Client.setObjectRetention(request);
}
@snekkboii we cannot reproduce the issue on the latest version and ECS 3.8. Please kindly provide ECS version, object client version and your OS information, if you are still facing the issue from your side. Thanks.
@snekkboii As it has been a long time since the last response, I'll close the ticket. Please feel free to reopen it if you hit the same issue.