Problem with Ektorp and android



I try to use ektorp client for replication in android and I have an error :
org.ektorp.DocumentNotFoundException: nothing found on db path: /_replicate, Response body: {“error”:“not_found”,“reason”:“unknown URL”}

I installed a gateway and a CouchBase server.
I access to the url /sync_gateway, but the client try to reach /sync_gateway/_replicate.
What’s this ??? and what I have to do to make it work ???

Thank you by advance
Best regards

My code :
// start Ektorp adapter

  		  HttpClient httpClient = new AndroidHttpClient.Builder()
  		  CouchDbInstance dbInstance = new StdCouchDbInstance(httpClient);

  		  // create a local database
  		  CouchDbConnector dbConnector = new StdCouchDbConnector("sync_gateway", dbInstance);
  		  // pull this database to the test replication server
  		  ReplicationCommand pullCommand = new ReplicationCommand.Builder()

  		  ReplicationStatus status = dbInstance.replicate(pullCommand);


It looks like you are creating an HTTP Client pointed at the Sync Gateway. What you really want to do is point it at the HTTP endpoint for Couchbase Lite Android.

This example might help with your current code:

Or if you are just getting started, you might want to skip Ektorp all together and talk to our Native Java API. (It will be available in the beta2 of Couchbase Lite Android, due out soon.)

The docs are still being updated but take a look at this application for an example:


Thanks for reply

What is the endpoint ???
Could you explain me please ?

I saw the example :
It’s approximatively what I did, I justed had to adapt it with the latest version of ektorp, cos It does not work…

I saw too the grocerysync example, but It doesnt help me, it doesn’t work like all the other examples I saw in Ektorp and couchbase website, not the same libraries or versions, too complicated…