Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoClassDefFoundError/ExceptionInInitializerError on Android 2.3.3 and Jackson 2.9.0

See original GitHub issue

I discovered a NoClassDefFoundError/ExceptionInInitializerError when I run this Android app in the following environment:

  • Samsung GT-I9000
  • Android 2.3.3 (API level 8, Froyo)
  • no Google Play Services installed
  • com.fasterxml.jackson.core:jackson-databind:2.9.0 - 2.9.2
  • crash happens for DEBUG and RELEASE builds

Here is the excerpt which causes the crash. The full source code can be found here (commit: 4da721846ad4c9bca030fc1167aff3d8754abb72).

111 SimpleModule module = new SimpleModule();
112 module.addDeserializer(Circuit.class, new CircuitDeserializer());
113 ObjectMapper objectMapper = new ObjectMapper(); // <-- crash
114 objectMapper.registerModule(module);

The following stacktrace is generated when I open the FaqActivity from the toolbar menu:

    at com.fasterxml.jackson.databind.ObjectMapper.<init>(
    at com.fasterxml.jackson.databind.ObjectMapper.<init>(
    at de.avpptr.umweltzone.utils.ContentProvider.getContent(
    at de.avpptr.umweltzone.utils.ContentProvider.getContent(
    at de.avpptr.umweltzone.utils.ContentProvider.getFaqs(
    at de.avpptr.umweltzone.faqs.FaqActivity.onCreate(
Caused by: java.lang.ExceptionInInitializerError
    at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.<clinit>(
    ... 19 more
Caused by: java.lang.NoClassDefFoundError: com.fasterxml.jackson.databind.util.ClassUtil
    at com.fasterxml.jackson.databind.PropertyName.<init>(
    at com.fasterxml.jackson.databind.PropertyName.<clinit>(
    ... 20 more


  • The crash can be reproduced with the system-images;android-10;google_apis;x86 emulator image (Android 2.3.3, Google APIs)
  • The crash does not occur when I use jackson-databind:2.8.10.
  • The crash does not happen on another device: Nexus 5, Android 6.0.1, Google Play Services installed.
  • The crash does not occur on Android 4.1, API level 16 (tested with system-images;android-16;google_apis;x86 emulator).

Related issues

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

cowtowncodercommented, Oct 27, 2017

@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. As to major bugs, perhaps, depends on type of bug in question. I don’t think I have done that yet for a closed minor branch (unlike security patch or two), but I would not rule that out.

joelittlejohncommented, Oct 24, 2017

@johnjohndoe ☝️

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NoClassDefFoundError: com/fasterxml/jackson/core ...
I have no idea why this works. I already had version 2.3.3., which is where the error arrrived, but changing the version of...
Read more >
Affected versions of this package are vulnerable to Deserialization of Untrusted Data. The package mishandles the interaction between serialization gadgets and ...
Read more >
Jackson Dataformat YAML - Maven Repository
Support for reading and writing YAML-encoded data via Jackson abstractions. License, Apache 2.0. Categories, YAML ParsersData Formats. Tags, formatyamljson ...
Read more >
com.fasterxml.jackson.core:jackson-databind | Maven
com.fasterxml.jackson.dataformat:jackson-dataformat-xml, Version, 2.9.0, Relation, Direct ... com.lifeonwalden:app-common, Version, 1.0.9, Relation, Direct.
Read more >
Overview (jackson-databind 2.9.1 API) -
Basic data binding (mapping) functionality that allows for reading JSON content into Java Objects (POJOs) and JSON Trees ( JsonNode ), as well...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found