-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
NoClassDefFoundError at DeserializationContext.<init> on Android 4.1.2 and Jackson 2.10.0 #2599
Comments
Line 158 would be:
Looking at Now... given small number of usages it would probably be possible to replace them with equivalent JDK 6 code (it's just a null check). But I would be interested in knowing significance of the issue, wrt Android versions. I remember that compatibility with J2SE tends to increase with newer Android versions and in some cases problems only affect old enough versions that it is not necessarily worth it addressing the problem. |
If I get you right then you are asking for numbers of the current distribution of Android versions. The official statement from Google can be found here - the latest version is from May 2019. As the table shows there is minimal amount of users (3.5%) which use devices running Android 4.0.x (API 15) - 4.3.x (API 19). |
Yes, that is what I wanted to get an idea of. As SDK javadocs: https://developer.android.com/reference/java/util/Objects class was added in Android SDK API level 19. With assumption that 19+ do not have the issue, it would affect less than 4% of phones. Not entirely trivial amount but quite small. I guess I might as well replace usage for now, regardless. Would be interesting to know how far back this helps. I am guessing it might make 16+ work but no further (I think there are other issues for older versions). |
At least I know that there is other issues which we discussed in #1802, linked above. API 14 is the lowest version being relevant when published on Google Play since Google has forced developers to comply to this version or higher in 2019. |
Ah. Yes, that's the previous discussion I vaguely recalled. I changed 2.10 branch to replace few Objects.requireNonNull() instances (except for tests), so 2.10.3 should work better. One note: I could add a note on https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.10 if it could be verified that specific API level appears to work. Earlier releases notes (esp https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.8) actually suggest 19+ would be needed but I think that was due to #1802 being fixed quite late in patches. |
Thank you for the quick patch.
I am happy to test this with my project and share the results with you. I am looking forward to do so once the version is released - or is there a snapshot build available somewhere? |
+ Error: "NoClassDefFoundError: java.util.Objects". + Revert version update done in: db1173d. + Related: FasterXML/jackson-databind#2599. Resolves #50.
+ Changelog: https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.10.3. + Related: FasterXML/jackson-databind#2599 and f11de9f. + Successfully tested on: Emulator, Android 4.1.2 (API 16) Pixel 2, Android 10 (API 29)
I discovered a
NoClassDefFoundError: java.util.Objects
when I run this Android app in the following environment:system-images;android-16;google_apis;x86
, revision: 6com.fasterxml.jackson.core:jackson-databind:2.10.0 - 2.10.2
DEBUG
andRELEASE
buildsHere is the excerpt which causes the crash. The full source code can be found here (commit:
db1173da74c2b7c1e296a612af88faf9bb281dc4
) where I raised the version ofjackson-databind
from v.2.9.9 to v.2.10.2:The following stacktrace is generated when I open the
ZonesFragment
from the toolbar menu:I also checked if the crash disappears when I use the new builder pattern:
The same error occurs. Here is the associated stacktrace:
Findings
jackson-databind:2.9.9
.system-images;android-19;google_apis;x86
, revision: 38.system-images;android-18;google_apis;x86
, revision: 6.Related
The text was updated successfully, but these errors were encountered: