getting https://api.backendless.com/v1/binary error

Hi ,

When i am saving data from my realm database to Backendless server at that time i am getting this error.
Thank you for your help!

Hello,

Is this the entire error message or there is more to it?

Have you called Backendless.initApp in your application?

What do you mean “saving data from my realm database to Backendless server” ?

Mark

This is entire message.And yes i have called Backendless.initApp in my Application class.
By mean of “saving data from realm to backendless”. Actually i am using backendless for my application but initially i saved my all data to realm database and after every 24 hour i saved that all data to backendless. So at that time after every 24 hour i get data from realm database and save that to backendless .
At that time i am getting this error

Is there a stack trace?

Backendless.Data.of(foo.class).save(profile, new AsyncCallback<foo>() {
@Override
public void handleResponse(foo profiles) {
Log.e(“response”, “response”);
}

@Override
public void handleFault(BackendlessFault backendlessFault) {
    Log.e("fault...", backendlessFault.getMessage());
}

});
i am using this method and getting backendless fault

profile is object which i am getting from realm database

Is profile an instance of the foo class?

yes, it is

What if you try something like this (essentially bypassing Realm), does it work:

Backendless.Data.of(foo.class).save(new foo(), new AsyncCallback<foo>() {
@Override
public void handleResponse(foo profiles) {
Log.e(“response”, “response”);
}

@Override
public void handleFault(BackendlessFault backendlessFault) {
Log.e(“fault…”, backendlessFault.getMessage());
}
});

That’s work fine. I am sending you file in which i am doing this.May b it make you more clear.

ProfileSaveService.txt (2.05kB)

I was able to duplicate the error. We need to add support for realm proxy classes. It will require some refactoring, but is totally possible. Will let you know when there is a build for you to try (should not take long)

Ok thank you Mark .

There is a new build in the github repo with support for Realm.io object persistence in Backendless. Could you please grab the jar from here (click “View Raw”):

https://github.com/Backendless/Android-SDK/blob/master/out/backendless.jar

There is nothing special you need to do, it should just work. Let me know how it goes.

Regards,
Mark

Hi,Mark
thanks for help
But when i am using the new jar file which you gave me after that when i fetch data from server like:

List<Profiles> profilelist;
Backendless.Data.of(Profiles.class).find(dataQuery, new AsyncCallback<BackendlessCollection<Profiles>>() {
@Override
public void handleResponse(BackendlessCollection<Profiles> profilesBackendlessCollection) {
profilelist.addall(profilesBackendlessCollection.getCurrentPage()); for (int i = 0; i < profilelist.size(); i++) {
Profiles prof = profilelist.get(i); //this exception is happened here } @Override
public void handleFault(BackendlessFault backendlessFault) {
}});

java.lang.ClassCastException: java.util.HashMap cannot be cast to com.abc.BackendLess.Models.Profiles
at android.widget.AbsListView.obtainView(AbsListView.java:2177)
at android.widget.GridView.onMeasure(GridView.java:1040)
at android.view.View.measure(View.java:15848)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at android.view.View.measure(View.java:15848)
at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1489)
at android.view.View.measure(View.java:15848)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:847)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
at android.view.View.measure(View.java:15848)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)
at android.view.View.measure(View.java:15848)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
at android.view.View.measure(View.java:15848)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at android.view.View.measure(View.java:15848)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
at android.view.View.measure(View.java:15848)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at android.view.View.measure(View.java:15848)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at com.navdrawer.SimpleSideDrawer.onMeasure(SimpleSideDrawer.java:443)
at android.view.View.measure(View.java:15848)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5012)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2189)
at android.view.View.measure(View.java:15848)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1905)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1104)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1284)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1004)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5481)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
at android.view.Choreographer.doCallbacks(Choreographer.java:562)
at android.view.Choreographer.doFrame(Choreographer.java:532)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)

Hi Hemangi,

This is fixed now, please get the updated jar and try again.

Regards,
Mark

Hi Mark,
Still i am getting the same error https://api.backendless.com/v1/binary while save data from realm to backendless.

All the tests we built pass, there is got to be something different. Could you please put together an isolated test demonstrating the error and send me the code?

Regards,
Mark

Ok i will send you code as soon as posssible.

Thank you! We’re very close to getting it working for you!

Hi Mark,

Here is the code…
Thanks for support…

RealmBackendlessDemoApp.rar (20.71MB)