com.couchbase.client.deps.com.fasterxml.jackson.core.JsonParseException & m.couchbase.client.java.error.TranscodingException

Hi There …

We are facing the issue when the document contains open/closing curl braces {}.
We have a encrypted content in one of the fields of the document and which may contain curl braces {}.
When retrieving this document we are facing the below error.

This occurs from SDK End and the couchbase-client.version is 2.4.2.
The same query works well on CBQ.

Code Snippet :
N1qlQueryResult result = factory.getBucket(couchbaseBucket.getBucketName(CouchbaseConstant.BUCKET_TRANS)).getBucket(CouchbaseConnectionConfig.CLUSTER_PRIMARY).query(N1qlQuery.parameterized(buildGetStatement(ID, docType), params));

Any help is appreciated, thank you!

Similar topic for more details can be found at - https://forums.couchbase.com/t/exception-while-query-view/5712

m.couchbase.client.java.error.TranscodingException: Error deserializing row value from bytes to JsonObject
at com.couchbase.client.java.query.DefaultAsyncN1qlQueryRow.value(DefaultAsyncN1qlQueryRow.java:61)
at com.couchbase.client.java.query.DefaultN1qlQueryRow.value(DefaultN1qlQueryRow.java:48)
at com.couchbase.client.java.query.DefaultN1qlQueryRow.toString(DefaultN1qlQueryRow.java:53)

Caused by: com.couchbase.client.deps.com.fasterxml.jackson.core.JsonParseException: Unexpected end-of-input in VALUE_STRING
at [Source: [B@7688047a; line: 11, column: 1625]
at com.couchbase.client.deps.com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1586)
at com.couchbase.client.deps.com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:521)
at com.couchbase.client.deps.com.fasterxml.jackson.core.base.ParserMinimalBase._reportInvalidEOF(ParserMinimalBase.java:458)
at com.couchbase.client.deps.com.fasterxml.jackson.core.base.ParserMinimalBase._reportInvalidEOF(ParserMinimalBase.java:454)
at com.couchbase.client.deps.com.fasterxml.jackson.core.base.ParserBase.loadMoreGuaranteed(ParserBase.java:507)
at com.couchbase.client.deps.com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishString2(UTF8StreamJsonParser.java:2453)
at com.couchbase.client.deps.com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishAndReturnString(UTF8StreamJsonParser.java:2433)
at com.couchbase.client.deps.com.fasterxml.jackson.core.json.UTF8StreamJsonParser.getValueAsString(UTF8StreamJsonParser.java:334)
at com.couchbase.client.java.transcoder.JacksonTransformers$AbstractJsonValueDeserializer.decodeObject(JacksonTransformers.java:86)
at com.couchbase.client.java.transcoder.JacksonTransformers$AbstractJsonValueDeserializer.decodeObject(JacksonTransformers.java:74)
at com.couchbase.client.java.transcoder.JacksonTransformers$JsonObjectDeserializer.deserialize(JacksonTransformers.java:165)
at com.couchbase.client.java.transcoder.JacksonTransformers$JsonObjectDeserializer.deserialize(JacksonTransformers.java:160)
at com.couchbase.client.deps.com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3807)
at com.couchbase.client.deps.com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2890)
at com.couchbase.client.java.query.DefaultAsyncN1qlQueryRow.value(DefaultAsyncN1qlQueryRow.java:58)
... 51 more

If you can, please verify you’re not seeing any errors in the server’s logs and then get us FINEST/TRACE level logs from running a test on the client. Note that the current client is in the 2.5 series and actually has a new streaming parser with improvements.

Thanks for your reply @ingenthr.
With 2.5.4 version this seems to be working fine.
I will see different combinations and keep the forum posted on this.