SAP-samples / cloud-objectstore-java-sample

The Object Store reference application aims to provide a single-code line application, which can be run in SAP BTP, Cloud Foundry environment, consuming Object Store service with different IaaS providers underneath - e.g. AWS, GCS, Azure.
Apache License 2.0
15 stars 15 forks source link

Error calling GET /storage #33

Open cinmod opened 1 month ago

cinmod commented 1 month ago

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

singhabhi1999 commented 3 weeks ago

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