cloud-objectstore-java-sample icon indicating copy to clipboard operation
cloud-objectstore-java-sample copied to clipboard

Error calling GET /storage

Open cinmod opened this issue 1 year ago • 1 comments

Hi, I was able to deploy and bind the app to my object store service. While calling the GET /storage method from Postman, I am getting this error:-

ERROR 7 --- [nio-8080-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException: Cannot invoke "org.jclouds.blobstore.domain.Blob.getMetadata()" because "blob" is null] with root cause 2024-06-05T11:47:45.43+0200 [APP/PROC/WEB/0] OUT java.lang.NullPointerException: Cannot invoke "org.jclouds.blobstore.domain.Blob.getMetadata()" because "blob" is null 2024-06-05T11:47:45.43+0200 [APP/PROC/WEB/0] OUT at com.sap.refapps.objectstore.util.ObjectStoreUtil.createBlobFile(ObjectStoreUtil.java:60) ~[classes/:1.1.1] 2024-06-05T11:47:45.43+0200 [APP/PROC/WEB/0] OUT at com.sap.refapps.objectstore.repository.ObjectStoreRepository.listFiles(ObjectStoreRepository.java:103) ~[classes/:1.1.1] 2024-06-05T11:47:45.43+0200 [APP/PROC/WEB/0] OUT at com.sap.refapps.objectstore.service.AWSObjectStoreService.listObjects(AWSObjectStoreService.java:42) ~[classes/:1.1.1] 2024-06-05T11:47:45.43+0200 [APP/PROC/WEB/0] OUT at com.sap.refapps.objectstore.controller.ObjectstoreController.listFiles(ObjectstoreController.java:54) ~[classes/:1.1.1]

Is there something NULL in my deployment ? regards Domnic

cinmod avatar Jun 05 '24 10:06 cinmod

Hi @cinmod ,

This is just make sure , you added Content-Type : application/json to your request? Also , were you able to post/upload your file to Object Store?

Regards, Abhinav

singhabhi1999 avatar Jun 11 '24 07:06 singhabhi1999