title: Spring Data Couchbase Unable to load view
body: <p>We are using Spring Data Couchbase project and when trying to execute a existing view in production running into the below error</p>
  
  <pre><code>HTTP Status 500 - org.springframework.dao.InvalidDataAccessResourceUsageException: 
  Could not load view "fooCount" for design doc "_design/foo"; 
  nested exception is com.couchbase.client.protocol.views.InvalidViewException: 
  Could not load view "fooCount" for design doc "_design/foo"
  </code></pre>
  
  <p>Below is our Spring Data Repository Definition</p>
  
  <pre><code>public interface FooRepository extends CrudRepository&lt;Foo,String&gt;{
  
         @View(designDocument="_design/foo",viewName="fooCount")
         public Long fooCount();
  
  }
  </code></pre>
  
  <p>Can anyone provide an example of executing query using couchbase views? 
  The <a href="http://docs.spring.io/spring-data/couchbase/docs/current/reference/html/#couchbase.repository.views" rel="nofollow">documentation</a> seems to be missing an example of doing it.</p>