Java client SDK not showing N1QL error message

I was using Couchbase 4.5.1 CE with java client 2.2.8.
I upgraded to 6.0 CE without updating the java client. Now some time N1QL query getting failed. I have logged the query and tried executing the Couchbase console directly. It executed perfectly. Any idea about this? Upgrading java client requires lot of development effort, we cannot do it at this moment. Any other solution?
Thank you in advance for the help

Error:
30-Mar-2021 09:42:09.879 SEVERE [http-nio-8080-exec-4] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcher] in context with path threw exception [Request processing failed; nested exception is org.springframework.data.couchbase.core.CouchbaseQueryExecutionException: Unable to execute query due to the following n1ql errors: ] with root cause
org.springframework.data.couchbase.core.CouchbaseQueryExecutionException: Unable to execute query due to the following n1ql errors:
at org.springframework.data.couchbase.core.CouchbaseTemplate.findByN1QLProjection(CouchbaseTemplate.java:476)

Hi @jefinjeeva

Upgrading java client requires lot of development effort, we cannot do it at this moment.

I assume this is in relation to the 3.x client? It’s not too much work, and we have a migration guide that can help. But regardless, for a quicker solution, could you consider upgrading to the latest version of the 2.x series, which should be a drop-in change? 2.2.8 is nearly five years old at this point. I can’t say for sure what the problem you’re seeing is, but there have been many fixes and improvements since then.

@graham.pople That was a great answer.
I have upgraded the java client version to the latest 2.x series without much effort. I was using Spring Data Couchbase. So upgrading the Spring Data Couchbase solved the issue. Thank you for your input. That saved my day.

1 Like

Glad to hear it @jefinjeeva :slight_smile:

1 Like