Ektorp NoClassDefFoundError: org.ektorp.impl.docref.DocumentReferenceSerializerProvider

I try to use the Ektorp CouchDB library in an Android application, and I always get this exception:

java.lang.NoClassDefFoundError: org.ektorp.impl.docref.DocumentReferenceSerializerProvider

Here is my code:

HttpClient authenticatedHttpClient = new StdHttpClient.Builder().host("myhostname").port(5984).username("username").password("password").build();
CouchDbInstance dbInstance = new StdCouchDbInstance(authenticatedHttpClient);
CouchDbConnector db = dbInstance.createConnector("luscinia", true);

An exception is always found in the last line of the above code.

I followed erktop dependency widgets here: http://code.google.com/p/ektorp/wiki/dependencies

As a result, my project contains:

  • Total U 2.0.1.jar
  • HttpClient-4.1.1.jar
  • JACKSON-core-ASL-1.8.1.jar
  • JACKSON-Mapper-ASL-1.8.1.jar
  • org.ektorp-1.1.1.jar
  • SLF4J-api-1.6.1.jar
  • slf4j-simple-1.6.1.jar (slf4j terminates without it)

LogCat gives me a warning and error lines before the exception, maybe they can help:

Link of class 'Lorg/ektorp/impl/docref/DocumentReferenceSerializerProvider;' failed
Could not find class 'org.ektorp.impl.docref.DocumentReferenceSerializerProvider', referenced from method org.ektorp.impl.StdObjectMapperFactory.createObjectMapper

I don’t understand what they mean. Any idea?

+3
2

, Ektorp 1.1.1 Jackson 1.8. 1.2.0, . 1.7.7 .

+4

Java-, , java, , java, android. jvm. https://github.com/couchone/libcouch-android Android.

0

All Articles