Not able to Decode Legacy data with 2.0.1 client

I have upgraded Java Client to 2.0.1 and Couchbase server 3.0.1.

The data was inserted by dot net client which was already there in the bucket before upgrade.
With version 1.3.2 client i was able to retrieve the data just by


After java client upgrade to 2.0.1, i have tried

bucket.get(key); // did not worked
bucket.get(key, JsonArrayDocument.class); // did not worked

the data format is

key = "k1"
value =

when i debug i have noticed the flags=274 (not sure about this)
Please help. Thanks in advance.

Exception stack trace: Flags (0x112) indicate non-JSON document for id k1, could not decode.
        at rx.internal.operators.OperatorMap$1.onNext(
        at rx.internal.operators.OperatorFilter$1.onNext(
        at rx.internal.operators.OperatorSubscribeOn$1$1$1.onNext(
        at rx.subjects.SubjectSubscriptionManager$SubjectObserver.onNext(
        at rx.subjects.AsyncSubject.onCompleted(
        at com.couchbase.client.core.ResponseHandler.onEvent(
        at com.couchbase.client.core.ResponseHandler.onEvent(
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$
Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: com.couchbase.client.core.message.kv.GetResponse.class
        at rx.exceptions.OnErrorThrowable.addValueAsLastCause(
        at rx.internal.operators.OperatorMap$1.onNext(
        ... 11 more

Yes, that kind of makes sense that it breaks. The legacy .NET client is not compatible with the 2.0 SDK of Java. You can write a custom transcoder and document type to make that happen though, I wonder why it works with the 1.3 SDK, since the flag is also different.

Can you tell me all the doc types (with flags) you need to read from the .NET sdk? I can write you a simple example to make that happen then. Also, do you need to write (so read/write together with the .NET sdk?)


We are inserting following type of data:

  1. Simple string
  2. Array of strings
    I am not sure about the flags value for these.

Can you please provide me the sample example for this.

Thanks in advance.

Are the Strings and array of Strings JSON compatible or a different format?

@jmorris can you help identifying the flags maybe?

They are Json compatible.

@daschl @shivayemula .NET 1.3.X treats JSON as a simple UTF8 string. The serialization/deserialization is done after the fact when you use one of the extension methods to do the conversion.