java.lang.ClassCastException: com.example.RealmInteger cannot be cast to io.realm.internal.RealmObjectProxy

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by AlexLardschneider
, 1 year ago
com.example.RealmInteger cannot be cast to io.realm.internal.RealmObjectProxy
java.lang.ClassCastException: com.example.RealmInteger cannot be cast to io.realm.internal.RealmObjectProxy
at io.realm.DynamicRealmObject.setList(DynamicRealmObject.java:602)
at com.example.RealmHelper$Migration$1.apply(RealmHelper.java:132)
at io.realm.RealmObjectSchema.transform(RealmObjectSchema.java:475)
at com.example.RealmHelper$Migration.migrate(RealmHelper.java:126)
at io.realm.BaseRealm$3.onResult(BaseRealm.java:705)
at io.realm.RealmCache.invokeWithGlobalRefCount(RealmCache.java:267)
at io.realm.BaseRealm.migrateRealm(BaseRealm.java:685)
at io.realm.Realm.migrateRealm(Realm.java:1221)
at io.realm.Realm.migrateRealm(Realm.java:1208)
at io.realm.Realm.createInstance(Realm.java:235)
at io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:126)
at io.realm.Realm.getDefaultInstance(Realm.java:174)
at com.example.RealmHelper.init(RealmHelper.java:86)
at com.example.AppApplication.onCreate(AppApplication.java:95)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.