Documents are not synced to cbl after adding to cbs (through sdk)

I have used the java sdk for inserting documents into CBS. The documents are able to go through the sync gateway and i was able to view them in the sync gateway admin ui with the channels they are assigned but they are not synced to the CBL databases . I am using CBS 5.0 and sync gateway 1.5 versions.

Hi,

What about the CBL version ?

Are you in continuous sync mode ?

What’s your tech in the mobile device ? How do you start the replication ?

This may help to be able to help you.

Steeve

CBL java version is 1.4.1
yes it is in continuous sync mode.
I have use the following code

           url = new URL("syncGatewayURL");
    	Replication pull = database.createPullReplication(url);
    	pull.setContinuous(true);
    	
		Authenticator auth = new BasicAuthenticator("USERNAME", "PASSWORD");
    	pull.setAuthenticator(auth);
    	pull.start();

The docs that i entered in CBS was able to seen in syncGateway admin page and when i hit the save doc in the syncgateway then it was able to replicate in clients.

  • What is your sync gateway config file look like ? Do you have the relevant config flags shared-bucket-access and import_docs set ? Refer to this post or blog for the same.
  • If the flags are set correctly, please share details of the sync gateway logs. If the docs are being imported by the SGW correctly,you should see messages indicating the same
1 Like

Thanks for the reply.
I have figured it out and its working.

Can you elaborate on what exactly was the issue (would come in handy for others encountering this as well)

I was trying to push the data into the couchbase server using java sdk and hoping for the replication of this document to the clients(couchbase lite) through sync gateway. I have used the bucket shadowing earlier but after moving to the couchbase server 5.0 with sync gateway 1.5 i have enabled the shared bucket access = true. It worked seamlessly without the use of the bucket shadowing.

Cool. Glad that worked. Thanks for the update.

1 Like