Accessing data from Couchbase using java


#1

I want to access data from couchbase using java ViewQuery but unable to do that due to the following exception.

net.spy.memcached.transcoders.SerializingTranscoder: Failed to decompress data
java.util.zip.ZipException: Not in GZIP format

Note:- If That’s important :-
I am storing the data in couchbase using PHP and trying to fetch data using Java


#2

Hi @hitesh.goyal Looks like you are using an older java client 1.x series. Can you update to the latest java client 2.3.3 version and try again.


#3

Hi,
I have updated the version of java client.

com.couchbase.client
java-client
2.3.3

but the problem is same. Still no change has been reflected.


#4

Are you using json_encode in php while storing documents, if so you can try retrieving them as StringDocument in java.
If you are directly storing as php objects, you should be able to read them as JsonDocument in java.

Hope this helps,
Subhashni


#5

I am storing the data directly as php objects.
I am accessing the data using CouchbasePojoInputOperator which emits a row of data as tuples. but still i am unable to do that.