Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization problem due to Active Android database library #147

Closed
ahmadalibaloch opened this issue Apr 14, 2016 · 2 comments
Closed

Serialization problem due to Active Android database library #147

ahmadalibaloch opened this issue Apr 14, 2016 · 2 comments

Comments

@ahmadalibaloch
Copy link

ahmadalibaloch commented Apr 14, 2016

The exception looks like this
Caused by: java.lang.UnsupportedOperationException: Attempted to serialize java.lang.Class: com.dgheating.mobileapp.Entities.Project. Forgot to register a type adapter?

This happens only when I extend my Projectclass by com.activeandroid.Model

Here is the complete exception.

Caused by: java.lang.UnsupportedOperationException: Attempted to serialize java.lang.Class: com.xx.yy.Entities.Project. Forgot to register a type adapter? at com.google.gson.internal.bind.TypeAdapters$1.write(TypeAdapters.java:69) at com.google.gson.internal.bind.TypeAdapters$1.write(TypeAdapters.java:63) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:113) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:240) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:113) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:240) at com.google.gson.internal.bind.ObjectTypeAdapter.write(ObjectTypeAdapter.java:107) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:96) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:60) at com.google.gson.Gson.toJson(Gson.java:605) at com.google.gson.Gson.toJson(Gson.java:584) at com.google.gson.Gson.toJson(Gson.java:539) at com.google.gson.Gson.toJson(Gson.java:519) at com.orhanobut.hawk.GsonParser.toJson(GsonParser.java:26) at com.orhanobut.hawk.HawkEncoder.encode(HawkEncoder.java:37) at com.orhanobut.hawk.Hawk.zip(Hawk.java:98) at com.orhanobut.hawk.Hawk.put(Hawk.java:57) at com.xx.yy.Fragments.ProjectFragment.gotMyProjects(ProjectFragment.java:84)

@orhanobut
Copy link
Owner

Is this still an issue with the new version?

@ahmadalibaloch
Copy link
Author

I am sorry but can't check it as I have moved that app to Realm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants