{"action":"created","issue":{"url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/issues/129","labels_url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/issues/129/comments","events_url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/issues/129/events","html_url":"https://github.com/CMPUT301W15T07/TravelTracker/issues/129","id":66569201,"number":129,"title":"GSON no-args constructor.","user":{"login":"kdbanman","id":1323521,"avatar_url":"https://avatars.githubusercontent.com/u/1323521?v=3","gravatar_id":"","url":"https://api.github.com/users/kdbanman","html_url":"https://github.com/kdbanman","followers_url":"https://api.github.com/users/kdbanman/followers","following_url":"https://api.github.com/users/kdbanman/following{/other_user}","gists_url":"https://api.github.com/users/kdbanman/gists{/gist_id}","starred_url":"https://api.github.com/users/kdbanman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdbanman/subscriptions","organizations_url":"https://api.github.com/users/kdbanman/orgs","repos_url":"https://api.github.com/users/kdbanman/repos","events_url":"https://api.github.com/users/kdbanman/events{/privacy}","received_events_url":"https://api.github.com/users/kdbanman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/labels/backend","name":"backend","color":"bfe5bf"},{"url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/labels/help%20wanted","name":"help wanted","color":"006b75"},{"url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/labels/high","name":"high","color":"ff0000"}],"state":"open","locked":false,"assignee":{"login":"kdbanman","id":1323521,"avatar_url":"https://avatars.githubusercontent.com/u/1323521?v=3","gravatar_id":"","url":"https://api.github.com/users/kdbanman","html_url":"https://github.com/kdbanman","followers_url":"https://api.github.com/users/kdbanman/followers","following_url":"https://api.github.com/users/kdbanman/following{/other_user}","gists_url":"https://api.github.com/users/kdbanman/gists{/gist_id}","starred_url":"https://api.github.com/users/kdbanman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdbanman/subscriptions","organizations_url":"https://api.github.com/users/kdbanman/orgs","repos_url":"https://api.github.com/users/kdbanman/repos","events_url":"https://api.github.com/users/kdbanman/events{/privacy}","received_events_url":"https://api.github.com/users/kdbanman/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/milestones/13","html_url":"https://github.com/CMPUT301W15T07/TravelTracker/milestones/P5%20-%20Elasticsearch%20Integration","labels_url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/milestones/13/labels","id":977877,"number":13,"title":"P5 - Elasticsearch Integration","description":"Functioning Elasticsearch integration (both server- and client-side).","creator":{"login":"TheLastBanana","id":1923551,"avatar_url":"https://avatars.githubusercontent.com/u/1923551?v=3","gravatar_id":"","url":"https://api.github.com/users/TheLastBanana","html_url":"https://github.com/TheLastBanana","followers_url":"https://api.github.com/users/TheLastBanana/followers","following_url":"https://api.github.com/users/TheLastBanana/following{/other_user}","gists_url":"https://api.github.com/users/TheLastBanana/gists{/gist_id}","starred_url":"https://api.github.com/users/TheLastBanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheLastBanana/subscriptions","organizations_url":"https://api.github.com/users/TheLastBanana/orgs","repos_url":"https://api.github.com/users/TheLastBanana/repos","events_url":"https://api.github.com/users/TheLastBanana/events{/privacy}","received_events_url":"https://api.github.com/users/TheLastBanana/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2015-02-13T03:36:45Z","updated_at":"2015-04-06T09:38:17Z","due_on":"2015-03-27T06:00:00Z","closed_at":null},"comments":11,"created_at":"2015-04-06T09:38:17Z","updated_at":"2015-04-06T14:10:38Z","closed_at":null,"body":"To replicate:\r\n\r\n1. uncomment the `new CacheDataSource()` injection line in DataSourceSingleton.java (line 53).\r\n2. start TravelTracker and log in as a claimant.\r\n3. create at least one Claim (or Item or Tag)\r\n4. delete one or more of the things you created in 3.\r\n5. close the app (completely)\r\n6. restart the app\r\n7. GSON crashes as detailed below\r\n\r\nOnly when deserializing a list of DeletionFlags for the CacheDataSource (line 106), GSON cannot find the no-args constructor of Document().  It can for other serialization/deserialization tasks.  Perhaps it's because the Document is wrapped by DeletionFlag in this case.\r\n\r\n```\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): FATAL EXCEPTION: main\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): java.lang.RuntimeException: Unable to start activity ComponentInfo{cmput301w15t07.TravelTracker/cmput301w15t07.TravelTracker.activity.LoginActivity}: java.lang.RuntimeException: Failed to invoke private cmput301w15t07.TravelTracker.model.Document() with no args\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat android.app.ActivityThread.access$600(ActivityThread.java:141)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat android.os.Handler.dispatchMessage(Handler.java:99)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat android.os.Looper.loop(Looper.java:137)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat android.app.ActivityThread.main(ActivityThread.java:5039)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat java.lang.reflect.Method.invokeNative(Native Method)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat java.lang.reflect.Method.invoke(Method.java:511)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat dalvik.system.NativeStart.main(Native Method)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): Caused by: java.lang.RuntimeException: Failed to invoke private cmput301w15t07.TravelTracker.model.Document() with no args\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat com.google.gson.internal.ConstructorConstructor$3.construct(ConstructorConstructor.java:107)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:186)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:103)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:196)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:81)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat com.google.gson.Gson.fromJson(Gson.java:810)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat com.google.gson.Gson.fromJson(Gson.java:775)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat cmput301w15t07.TravelTracker.util.GsonIOManager.load(GsonIOManager.java:68)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat cmput301w15t07.TravelTracker.util.PersistentList.loadList(PersistentList.java:203)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat cmput301w15t07.TravelTracker.util.PersistentList.<init>(PersistentList.java:63)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat cmput301w15t07.TravelTracker.model.CacheDataSource.<init>(CacheDataSource.java:106)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat cmput301w15t07.TravelTracker.model.CacheDataSource.<init>(CacheDataSource.java:91)\r\n04-06 09:19:04.112: E/AndroidRuntime(10083): \tat cmput301w15t07.TravelTracker.DataSourceSingleton.getDataSource(DataSourceSingleton.java:55)\r\n```"},"comment":{"url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/issues/comments/90077536","html_url":"https://github.com/CMPUT301W15T07/TravelTracker/issues/129#issuecomment-90077536","issue_url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/issues/129","id":90077536,"user":{"login":"kuzi117","id":676209,"avatar_url":"https://avatars.githubusercontent.com/u/676209?v=3","gravatar_id":"","url":"https://api.github.com/users/kuzi117","html_url":"https://github.com/kuzi117","followers_url":"https://api.github.com/users/kuzi117/followers","following_url":"https://api.github.com/users/kuzi117/following{/other_user}","gists_url":"https://api.github.com/users/kuzi117/gists{/gist_id}","starred_url":"https://api.github.com/users/kuzi117/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuzi117/subscriptions","organizations_url":"https://api.github.com/users/kuzi117/orgs","repos_url":"https://api.github.com/users/kuzi117/repos","events_url":"https://api.github.com/users/kuzi117/events{/privacy}","received_events_url":"https://api.github.com/users/kuzi117/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T14:10:37Z","updated_at":"2015-04-06T14:10:37Z","body":"This might be it... http://stackoverflow.com/a/11459691/2379240"}}