Exception with "beer-sample" bucket

#1

Hi There,

I am a newbie to couchbase and having a lo of problem with views. I can not run the simple view with couchbase "beer-sample"example.
I keep getting the exception:

"An unhandled exception of type ‘Couchbase.Exceptions.ViewNotFoundException’ occurred in Couchbase.dll

Additional information: Query failed for view by_name in design document beer"

I have .net application with couchbase server on win7 machine.

Here is my complete project:

Your help is much appreciated.

Thanks.

#2

Hi Guys,

I found the problem. I need to first create the view that I am trying to use. As there was no view created, I was getting exception.

The “beer-sample” example has two views those aren’t the view “by_name”

Documentation should include procedure to create the views by couchbase console.

Hope this will help someone like me.

#3

Hi Guys,

Problem was that there were no views created with “beer-sample” example. The documentation doesn’t mention anything about creating your views using couchbase console.

I was misguided and wasted alot of time. Finally, I understood that every view needs to be created first…
Documentation should also add view creation process using a console.

Hope this will help someone like me.

#4

Hi pappu_pandit -

Did you create the by_name view using the management console?

If not here is the map function:

function(doc, meta) { if (doc.type == "beer" && doc.name) { emit(doc.name, null); } }
  • Jeff