I'm using the startCopy API from azure-storage java sdk version 8.6.5 to copy blobs between containers within the same storage account.
String copyJobId = cloudBlockBlob.startCopy(srcBlob, srcBlob.getProperties().getContentMD5(), true,
null, null, null, null)
And I am getting the following exception -
[17:25:42.976] - [STDERR] com.microsoft.azure.storage.StorageException: The specified resource does not exist.
[17:25:42.977] - [STDERR] at com.microsoft.azure.storage.StorageException.translateException(StorageException.java:87)
[17:25:42.977] - [STDERR] at com.microsoft.azure.storage.core.StorageRequest.materializeException(StorageRequest.java:305)
[17:25:42.977] - [STDERR] at com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:196)
[17:25:42.978] - [STDERR] at com.microsoft.azure.storage.blob.CloudBlob.startCopy(CloudBlob.java:791)
[17:25:42.978] - [STDERR] at com.microsoft.azure.storage.blob.CloudBlockBlob.startCopy(CloudBlockBlob.java:302)
[17:25:42.978] - [STDERR] at com.microsoft.azure.storage.blob.CloudBlockBlob.startCopy(CloudBlockBlob.java:252)
If I use the other API without sync, copy works fine -
String copyJobId = cloudBlockBlob.startCopy(srcBlob); //This works
Any idea if I am missing anything here?
Thanks in advance!!!
EDITS - Adding the screenshot of exception using the test sample code by @Bowman.