title: Couchbase - getting "view_undefined" after accessing a newly created Production View
body: <p>I'm creating a Production View in Couchbase using </p>
  
  <pre><code>HttpFuture&lt;Boolean&gt; asyncResult = client.asyncCreateDesignDoc(designDocProd);
  Boolean success = asyncResult.get();
  </code></pre>
  
  <p>(Omitting the "dev_" prefix from the Design Doc's name creates it as Production View instead of Dev View)</p>
  
  <p>After checking that success indeed equals true, I try to access the view using <strong>couchbaseClient.query(view, query)</strong> , but then I get the following Error:</p>
  
  <pre><code>SERVER: unknown_error Reason: view_undefined
  </code></pre>
  
  <p>(Below is the Full Stack Trace if neeeded)</p>
  
  <p>If I add a sleep of 5 seconds, everything works well...</p>
  
  <p>Anyone encountered this issue? am I missing something? </p>
  
  <p>Thanks </p>
  
  <p>Eyal</p>
  
  <p>Full Stack Trace:</p>
  
  <pre><code>Caused by: java.lang.RuntimeException: Failed to access the view
      at com.couchbase.client.CouchbaseClient.query(CouchbaseClient.java:871)
      .
      .
  Caused by: java.util.concurrent.ExecutionException: OperationException: SERVER: unknown_error Reason: view_undefined
      at com.couchbase.client.internal.HttpFuture.waitForAndCheckOperation(HttpFuture.java:90)
      at com.couchbase.client.internal.HttpFuture.get(HttpFuture.java:74)
      at com.couchbase.client.internal.HttpFuture.get(HttpFuture.java:64)
      at com.couchbase.client.CouchbaseClient.query(CouchbaseClient.java:864)
  ... 54 more
  Caused by: OperationException: SERVER: unknown_error Reason: view_undefined
      at com.couchbase.client.protocol.views.NoDocsOperationImpl.parseError(NoDocsOperationImpl.java:106)
      at com.couchbase.client.protocol.views.ViewOperationImpl.handleResponse(ViewOperationImpl.java:68)
      at com.couchbase.client.ViewNode$MyHttpRequestExecutionHandler.handleResponse(ViewNode.java:204)
      at org.apache.http.nio.protocol.AsyncNHttpClientHandler.processResponse(AsyncNHttpClientHandler.java:417)
      at org.apache.http.nio.protocol.AsyncNHttpClientHandler.inputReady(AsyncNHttpClientHandler.java:242)
      at com.couchbase.client.http.AsyncConnectionManager$ManagedClientHandler.inputReady(AsyncConnectionManager.java:249)
      at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:172)
      at org.apache.http.impl.nio.DefaultClientIOEventDispatch.inputReady(DefaultClientIOEventDispatch.java:155)
      at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:161)
      at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:335)
      at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
      at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:275)
      at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
      at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:542)
      at java.lang.Thread.run(Thread.java:662)
  </code></pre>