-
-
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/ExceptionInInitializerError on Android 2.3.3 and Jackson 2.9.0 #1802
Comments
And just to make sure: class However... I don't see any significant initialization for this class; about the only thing is: private final static Iterator<?> EMPTY_ITERATOR = Collections.emptyIterator(); This method was added in JDK 1.7, so could that be missing from specific Android SDK version? If so, I guess it would be possible to retrofit this to avoid the problem (and leave 3.0 as is); however, 2.9 is meant to rely on JDK 7 so this is probably not the only place for similar issues. |
Do you mean in |
+ Happens on Android 2.3.3 (API level 8, Froyo) with Jackson 2.9.0. + See: FasterXML/jackson-databind#1802
@joelittlejohn Looking at: https://developer.android.com/about/dashboards/index.html I think that the root cause is that this old Android version does not include method Looking at: https://developer.android.com/reference/java/util/Collections.html#emptyIterator() limit appears to be "API level 19" which means Android https://developer.android.com/about/dashboards/index.html I will add a note on Jackson 2.9 release page: https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.9 What is interesting, however, is that I thought Jackson 2.8 would have similar limitation since it uses Java 7 features. As I said, if anyone wants to create patch to change this usage (and other similar small problems), I am not against 2.9 patch, although I will not merge those for Jackson 3.0. |
@johnjohndoe ☝️ |
Thank you for the explanation. Are you going to backport this? If v.2.9.x will no longer support these JDK / Android versions this notice should get a prominent place in the docs. |
Well this has been mentioned, announced and included as a warning for 2.8 release: https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.8 so it's not news per se. Unfortunately however feedback loop between Jackson project and Android developers (I don't think anyone on core team develops on Android unfortunately) has been... well, high-latency one. You have been very helpful and I appreciate that. But yes, it should be prominently included in 3.0 notes. Ideally based on solid information and tests done by someone who develops on Android. As to backporting: if someone wants to work on this and verify necessary changes, I will work with that person and merge PR(s) as necessary. I just do not have either time or experience to do it on my own, to properly verify fixes (much less automate it). |
Thank you again for pointing me to the release notes. Thinking about it, I am not sure if backporting is very much worth the effort since Android apps tend to raise their minimum SDK level more and more. Google themselves dictates this because they raise version ("minimum Android API level of 14") in widely used libraries such as Google Play Services library. The other question which has to be answered by each app individually is how many users are actually still using devices with older Android versions. One thing I would be interested in is if you are planning to release 2.8.x versions if security issues or major bugs are discovered which apply to this minor version? |
@johnjohndoe Yes, there's diminishing return on back-porting, and Google does tend to push for newer versions (since older versions are costly to support for them too). And yes, security issues are a class of problems for which new versions are theoretically possible for even otherwise closed branches. 2.8 is not yet officially closed, however, and I suspect I will be doing full 2.8.11 release at some point. Beyond this, micro-patches are a possibility. |
I discovered a
NoClassDefFoundError
/ExceptionInInitializerError
when I run this Android app in the following environment:com.fasterxml.jackson.core:jackson-databind:2.9.0 - 2.9.2
DEBUG
andRELEASE
buildsHere is the excerpt which causes the crash. The full source code can be found here (commit:
4da721846ad4c9bca030fc1167aff3d8754abb72
).The following stacktrace is generated when I open the
FaqActivity
from the toolbar menu:Findings
system-images;android-10;google_apis;x86
emulator image (Android 2.3.3, Google APIs)jackson-databind:2.8.10
.system-images;android-16;google_apis;x86
emulator).Related issues
The text was updated successfully, but these errors were encountered: