Android ektorp couchbase replication error

216 Views Asked by At

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()
.host("XXX")
.username("XXX")
.password("XXX")
.port(4984)
.build();

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()
.source("sync_gateway")
.target("XXX")
.continuous(true)
.build();

ReplicationStatus status = dbInstance.replicate(pullCommand);
0

There are 0 best solutions below