incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <...@apache.org>
Subject Re: 500 server error posting a view
Date Tue, 10 Jun 2008 18:08:24 GMT
Heya Brad,
your design document definition is incomplete see
http://wiki.apache.org/couchdb/HttpViewApi
"Creating Views" for how a complete design doc
needs to look like.

Cheers
Jan

On Jun 10, 2008, at 20:01, Brad King wrote:

> I'm trying to create a simple ad-hoc view based on one of the wiki  
> examples:
>
> POST /product/_test_view HTTP/1.0
> Content-Type: application/json
> Content-Length: 55
> Host: d0002rptdb02:5984
>
> {
>  "map" : "function(doc) { emit(null, doc); } "
> }
>
>
> This returns a 500 server error. Response details:
>
> HTTP/1.0 500 Internal Server Error
> Server: inets/develop
> Date: Tue, 10 Jun 2008 17:56:30 GMT
> Cache-Control: no-cache
> Pragma: no-cache
> Expires: Tue, 10 Jun 2008 17:56:30 GMT
> Connection: close
> Content-Type: text/plain;charset=utf-8
>
> {"error":"EXIT","reason":"{function_clause,\n    [{mod_couch,do,\n
>    [{mod,\n
> {init_data,{1414,\"172.20.3.43\"},\"d0002rptdb02\"},\n
> [],ip_comm,#Port<0.990>,httpd_conf_5984,\"POST\",\n
> \"d0002rptdb02:5984\/product\/_test_view\",\n
> \"\/product\/_test_view\",\"HTTP\/1.0\",\n              \"POST
> \/product\/_test_view HTTP\/1.0\",\n
> [{\"host\",\"d0002rptdb02:5984\"},\n
> {\"content-length\",\"55\"},\n
> {\"content-type\",\"application\/json\"}],\n              \"{\\r\\n
> \\\"map\\\" : \\\"function(doc) { emit(null, doc); }
> \\\"\\r\\n}\\r\\n\",\n              false},\n
> {uri_parts,\"product\",\"_test_view\",[],[],[]}]},\n
> {mod_couch,do,1},\n     {httpd_response,traverse_modules,2},\n
> {httpd_response,generate_and_send_response,1},\n
> {httpd_request_handler,handle_response,1},\n
> {gen_server,handle_msg,5},\n     {proc_lib,init_p,5}]}"}
>
> The server log says something about an unrecognized query language.
> What am I doing wrong? The c# CouchBrowse application also returns a
> 500 for the default query, so I'm thinking its some kind of server
> setup issue.
>
> Brad
>


Mime
View raw message