Getting view from couchbase
I'm trying to do a proof of concept with couchbase and as part of that I need to show how a view can be retrieved.
Using Java Client 1.1.4
I have created a couchbase data bucket, a Document( called limits_fiid_1) and a view (by_sales_limit) within that bucket using the Couchbase Console UI. The view has been published to production. Now in my code I'm trying the following:
and I get:
com.couchbase.client.protocol.views.InvalidViewException: Could not load view "by_sales_limit" for design doc "limits_fiid_1" at com.couchbase.client.CouchbaseClient.getView(CouchbaseClient.java:477) at com.mobibucks.mrs.listener.BeerServlet.doGet(BeerServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
I can however, do
and I do get back the JSON object representing the document in couchbase.
I understand the exception but not sure where I can start troubleshooting the cuase for it. Any pointers is appreciated.