Usecase: Try to delete a blob (size ~ 107kb) from a swift container using BlobStore.removBlob() api of jclouds.
Issue: Following exception is found in console: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $.
Code: Sharing the code snippet that I've used to delete a blob from a swift container.
BlobStore blobStore = getBlobStoreContext(); blobStore.removeBlob(containerName, fileName);
Debug: Following are my observations after debugging the code.
- The type of the blobstore is found to be RegionScopedSwiftBlobStore.
- stepinto blobStore.removeBlob(containerName, fileName); at line 396 in RegionScopedSwiftBlobStore class, I found it expects a response from StaticLargeObjectApi as shown in the below code and this is where the exception occurs: ** DeleteStaticLargeObjectResponse response = api.getStaticLargeObjectApi(regionId, container).delete(name);
Analysis: While the api BlobStore.removeBlob fails to delete a blob in a Swift container, it works fine in AWS S3 and GCS container. I also observed that if I use ObjectApi.delete(objectName) instead of BlobStore.removeBlob then the blob gets deleted from the swift container without any issue. As per the java doc of StaticLargeObjectApi, it is in beta and still under evaluation. Is this api stable?
Any help is highly appreciated.