-
Notifications
You must be signed in to change notification settings - Fork 166
Description
log
{"timestamp":"2025-07-16T15:00:12.267984423Z","@version":"1","message":"Stream size to upload is 0 bytes, this could potentially lead to data corruption. If this is not intended, please make sure all the OCI SDK dependencies point to the same version","logger":"c.o.b.h.c.jersey.JerseyHttpRequest","thread":"upload-worker-5","level":"WARN","level_value":30000,"commitId":"8c5c308","spanId":"6ce63656-ed29-4c81-a9e2-aa7f7ed0fe77","traceId":"6449a622-b0bc-4ba0-b5cd-938d3cc49109","dmsId":"14a92955-e974-43be-9eaf-97f17161807e","caller_class_name":"com.oracle.bmc.http.client.jersey.JerseyHttpRequest","caller_method_name":"logAvailable","caller_file_name":"JerseyHttpRequest.java","caller_line_number":101}
This is my caller method
private StoreResponse singlePartUpload(InputStream inputStream, String ociObjectPath, StoreRequest request) throws IOException {
// Prepare the PutObjectRequest
PutObjectRequest putObjectRequest = PutObjectRequest.builder()
.namespaceName(namespace)
.bucketName(bucketName)
.objectName(ociObjectPath)
.putObjectBody(inputStream)
.opcMeta(request.getMetadata())
.contentType(request.getContentType())
.contentLength(request.getContentLength())
.build();
// Upload the file to Object Storage
PutObjectResponse putObjectResponse = objectStorageClient.putObject(putObjectRequest);
if (putObjectResponse == null || StringUtils.isBlank(putObjectResponse.getETag())) {
throw new StorageException(OBJECT_STORAGE_ETAG_NOT_FOUND);
} else {
return StoreResponse.builder()
.objectPath(ociObjectPath)
.eTag(putObjectResponse.getETag())
.versionId(putObjectResponse.getOpcContentMd5()) // Not actual versionId, placeholder
.build();
}
}
Can someone help me here.
Thanks