If you are using couchbase spring cache then you might get following exception:
12:16:58,338 ERROR [com.arpit.common.util.Resource] (http-/127.0.0.1:8080-6) Error occured: Details com.couchbase.client.java.error.DocumentDoesNotExistException
This exception is raised by couchbase client when document does not exist in cache and a replace operation is used, possible use case is when you are caching the resource which return null (which was happening for me), for example:
@Override @Cacheable(value = "EMPLOYEE_", key = "#id") public Employee getEmployee(int id) { return null; }
If you are facing the same problem as me then you can fix it using the unless attribute of @Cacheable which is available as of Spring 3.2, as follows:
@Override @Cacheable(value = "EMPLOYEE_", key = "#id", unless = "#result == null") public Employee getEmployee(int id) { return null; }