Start a new topic

Storage - getEntity

I am unable to retrieve a single entity as per the example the Storage Guide:


    public class EventEntity extends GenericJson {

        private String id;

        private KinveyMetaData.AccessControlList acl;

        private KinveyMetaData meta;

        private String name;

        private String location;

        private String date;

        public EventEntity() {}



of course I am calling this procedure after successful Login, not that it should make a difference, but the from inside an onclick event of a button although same results are achieved weather it is called from inside a button on click or not:

private void getEntity(){

        AsyncAppData<EventEntity> myEvents = mKinveyClient.appData("events", EventEntity.class);
        myEvents.getEntity("5674d856e809485123025f27", new KinveyClientCallback<EventEntity>() {

            public void onSuccess(EventEntity result) {
				Log.v("TAG", "Success Called");


            public void onFailure(Throwable error) {

                Log.e("TAG", "failed to fetchByFilterCriteria", error);




 Back-End looks like:

the error I get in the catlog looks reads:


12-19 05:02:02.526 21570-21570/com.testapps.entitytestapp E/TAG: failed to fetchByFilterCriteria
                                                            REASON: Unable to parse the JSON in the response
                                                            FIX: examine BL or DLC to ensure data format is correct. If the exception is caused by `key <somkey>`, then <somekey> might be a different type than is expected (int instead of of string)
                                                            EXPLANATION: java.lang.IllegalArgumentException: 

all datatypes are as you can see are of String, except "_kmd" and "_alc" which are objects from Kinvey (which I presume are fine as they are given in the examples). as these are documented as being optional, I have also tried without, with no success.

same occurs when fetching all using the "get()" command, which the KinveyListCallBack

P.S there is no business logic / hooks in place what so ever.

1 Comment

Hi Sagar,

It appears that you are getting the data successfully from the backend but the calls are failing at SDK level.

Which Android SDK version are you using? Can you download the latest SDK version and test it for me?



Login or Signup to post a comment