{"action":"created","issue":{"url":"https://api.github.com/repos/RuedigerMoeller/fast-serialization/issues/53","labels_url":"https://api.github.com/repos/RuedigerMoeller/fast-serialization/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/RuedigerMoeller/fast-serialization/issues/53/comments","events_url":"https://api.github.com/repos/RuedigerMoeller/fast-serialization/issues/53/events","html_url":"https://github.com/RuedigerMoeller/fast-serialization/issues/53","id":56530082,"number":53,"title":"[Android] sun.misc.Unsafe not fully supported","user":{"login":"nicoruti","id":4671020,"avatar_url":"https://avatars.githubusercontent.com/u/4671020?v=3","gravatar_id":"","url":"https://api.github.com/users/nicoruti","html_url":"https://github.com/nicoruti","followers_url":"https://api.github.com/users/nicoruti/followers","following_url":"https://api.github.com/users/nicoruti/following{/other_user}","gists_url":"https://api.github.com/users/nicoruti/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoruti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoruti/subscriptions","organizations_url":"https://api.github.com/users/nicoruti/orgs","repos_url":"https://api.github.com/users/nicoruti/repos","events_url":"https://api.github.com/users/nicoruti/events{/privacy}","received_events_url":"https://api.github.com/users/nicoruti/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-02-04T14:06:09Z","updated_at":"2015-02-06T18:12:25Z","closed_at":"2015-02-05T21:00:34Z","body":"Although stated as Android compatible, I ran into an exception today:\r\n```\r\njava.lang.RuntimeException: java.io.IOException: java.lang.RuntimeException: java.lang.NoSuchMethodError: sun.misc.Unsafe.putBoolean\r\n            at org.nustaq.serialization.util.FSTUtil.rethrow(FSTUtil.java:122) ~[na:0.0]\r\n            at org.nustaq.serialization.FSTConfiguration.asObject(FSTConfiguration.java:875) ~[na:0.0]\r\n            at org.hive2hive.core.security.FSTSerializer.deserialize(FSTSerializer.java:59) ~[na:0.0]\r\n            at org.hive2hive.core.security.H2HDefaultEncryption.decryptAES(H2HDefaultEncryption.java:43) ~[na:0.0]\r\n            at org.hive2hive.core.network.data.vdht.EncryptedVersionManager.get(EncryptedVersionManager.java:178) ~[na:0.0]\r\n            at org.hive2hive.core.network.data.UserProfileManager$QueueWorker.run(UserProfileManager.java:203) ~[na:0.0]\r\n            at java.lang.Thread.run(Thread.java:841) ~[na:0.0]\r\n     Caused by: java.io.IOException: java.lang.RuntimeException: java.lang.NoSuchMethodError: sun.misc.Unsafe.putBoolean\r\n            at org.nustaq.serialization.FSTObjectInput.readObject(FSTObjectInput.java:240) ~[na:0.0]\r\n            at org.nustaq.serialization.FSTConfiguration.asObject(FSTConfiguration.java:873) ~[na:0.0]\r\n    ... 5 common frames omitted\r\n    Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodError: sun.misc.Unsafe.putBoolean\r\n            at org.nustaq.serialization.util.FSTUtil.rethrow(FSTUtil.java:122) ~[na:0.0]\r\n            at org.nustaq.serialization.FSTObjectInput.readObjectInternal(FSTObjectInput.java:327) ~[na:0.0]\r\n            at org.nustaq.serialization.FSTObjectInput.readObject(FSTObjectInput.java:304) ~[na:0.0]\r\n            at org.nustaq.serialization.FSTObjectInput.readObject(FSTObjectInput.java:238) ~[na:0.0]\r\n    ... 6 common frames omitted\r\n    Caused by: java.lang.NoSuchMethodError: sun.misc.Unsafe.putBoolean\r\n            at org.nustaq.serialization.FSTClazzInfo$FSTFieldInfo.setBooleanValue(FSTClazzInfo.java:858) ~[na:0.0]\r\n            at org.nustaq.serialization.FSTObjectInput.readObjectFields(FSTObjectInput.java:634) ~[na:0.0]\r\n            at org.nustaq.serialization.FSTObjectInput.instantiateAndReadNoSer(FSTObjectInput.java:515) ~[na:0.0]\r\n            at org.nustaq.serialization.FSTObjectInput.readObjectWithHeader(FSTObjectInput.java:356) ~[na:0.0]\r\n            at org.nustaq.serialization.FSTObjectInput.readObjectFields(FSTObjectInput.java:657) ~[na:0.0]\r\n            at org.nustaq.serialization.FSTObjectInput.instantiateAndReadNoSer(FSTObjectInput.java:515) ~[na:0.0]\r\n            at org.nustaq.serialization.FSTObjectInput.readObjectWithHeader(FSTObjectInput.java:356) ~[na:0.0]\r\n            at org.nustaq.serialization.FSTObjectInput.readObjectInternal(FSTObjectInput.java:323) ~[na:0.0]\r\n    ... 8 common frames omitted\r\n```\r\n\r\nUnfortunately, the <a href=\"https://android.googlesource.com/platform/libcore/+/master/libart/src/main/java/sun/misc/Unsafe.java\">Unsafe implementation of Android</a> is incomplete and not all methods are available.\r\n\r\nI tested with FST v.2.21 and Android 4.4.4. For the compilation, Android Studio with Java 7u71 is used."},"comment":{"url":"https://api.github.com/repos/RuedigerMoeller/fast-serialization/issues/comments/73285009","html_url":"https://github.com/RuedigerMoeller/fast-serialization/issues/53#issuecomment-73285009","issue_url":"https://api.github.com/repos/RuedigerMoeller/fast-serialization/issues/53","id":73285009,"user":{"login":"RuedigerMoeller","id":6097932,"avatar_url":"https://avatars.githubusercontent.com/u/6097932?v=3","gravatar_id":"","url":"https://api.github.com/users/RuedigerMoeller","html_url":"https://github.com/RuedigerMoeller","followers_url":"https://api.github.com/users/RuedigerMoeller/followers","following_url":"https://api.github.com/users/RuedigerMoeller/following{/other_user}","gists_url":"https://api.github.com/users/RuedigerMoeller/gists{/gist_id}","starred_url":"https://api.github.com/users/RuedigerMoeller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RuedigerMoeller/subscriptions","organizations_url":"https://api.github.com/users/RuedigerMoeller/orgs","repos_url":"https://api.github.com/users/RuedigerMoeller/repos","events_url":"https://api.github.com/users/RuedigerMoeller/events{/privacy}","received_events_url":"https://api.github.com/users/RuedigerMoeller/received_events","type":"User","site_admin":false},"created_at":"2015-02-06T18:12:25Z","updated_at":"2015-02-06T18:12:25Z","body":"upload underway, should be on maven org in some hours"}}