我尝试在android中使用ektorp客户端进行复制,我有一个错误: org.ektorp.DocumentNotFoundException:在db路径上找不到任何内容:/ _replicate,响应正文:{“error”:“not_found”,“reason”:“unknown URL”}
我安装了一个网关和一个CouchBase服务器。 我访问了url / sync_gateway,但客户端尝试访问/ sync_gateway / _replicate。 这是什么 ???以及我必须做些什么才能让它发挥作用????
提前谢谢你 最好的问候
我的代码:
// 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);