0

純粋なJavaとcouchbase-liteでの作業。次のコードを実行:

Manager manager = new Manager(new JavaContext("data"), Manager.DEFAULT_OPTIONS); Manager.enableLogging("同期", Log.VERBOSE);

    final Database db = manager.getDatabase("sync_gateway");
    URL url = new URL("http://localhost:4984/sync_gateway/");
    Replication push = db.createPushReplication(url);
    Replication pull = db.createPullReplication(url);
    pull.setContinuous(true);
    push.setContinuous(true);
    com.couchbase.lite.auth.Authenticator auth = AuthenticatorFactory.createBasicAuthenticator("GUEST", "");
    push.setAuthenticator(auth);
    push.setAuthenticator(auth);
    pull.setAuthenticator(auth);
    push.start();
    pull.start();

    on line push.start()
    it through exception:
    Jun 11, 2015 8:46:23 PM com.couchbase.lite.util.SystemLogger e
    SEVERE: Sync: RemoteRequest.run() exception: %s
    java.lang.ArrayIndexOutOfBoundsException: 1
        at com.couchbase.lite.support.RemoteRequest.preemptivelySetAuthCredentials(RemoteRequest.java:281)
        at com.couchbase.lite.support.RemoteRequest.run(RemoteRequest.java:96)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

    Jun 11, 2015 8:48:02 PM com.couchbase.lite.util.SystemLogger e
    SEVERE: Sync: RemoteRequest.run() exception: %s
    java.lang.ArrayIndexOutOfBoundsException: 1
        at com.couchbase.lite.support.RemoteRequest.preemptivelySetAuthCredentials(RemoteRequest.java:281)
        at com.couchbase.lite.support.RemoteRequest.run(RemoteRequest.java:96)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

    Jun 11, 2015 8:48:11 PM com.couchbase.lite.util.SystemLogger e
    SEVERE: Sync: RemoteRequest.run() exception: %s
    java.lang.ArrayIndexOutOfBoundsException: 1
    at com.couchbase.lite.support.RemoteRequest.preemptivelySetAuthCredentials(RemoteRequest.java:281)
        at com.couchbase.lite.support.RemoteRequest.run(RemoteRequest.java:96)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang

.Thread.run(Thread.java:745)

sync_gateway を開始し、couchbase lite を couchbase full ノードに同期したいと考えています。カウチベースのフルノードのIPでsync_gatewayを起動しました。私が知っているように、このcouchbase liteレプリケーションコードを実行するだけで、couchbase liteのデータがcouchbaseフルノードにコピーされます。親切に助けてください。

4

1 に答える 1

0

この質問の解決策については、Couchbase フォーラムでの議論を参照してください。

于 2015-06-18T13:40:22.390 に答える