[jira] Commented: (COUCHDB-831) badarity

2010-07-22 Thread Sebastian Cohnen (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12891151#action_12891151
 ] 

Sebastian Cohnen commented on COUCHDB-831:
--

You need to query this view with  curl 
http://127.0.0.1:5984/argh/_design/foo/_views/foo (since your view's name is 
foo not bar). Although I'd like to suggest to give a slightly more readable 
(and understandable) error message here. What about View 
_design/foo/_views/bar not found? Returning a 404 would also be more 
appropriate, too.

 badarity
 

 Key: COUCHDB-831
 URL: https://issues.apache.org/jira/browse/COUCHDB-831
 Project: CouchDB
  Issue Type: Bug
Affects Versions: 1.0
 Environment: mac os x
Reporter: Harry Vangberg

 I have an empty database with nothing but this design document:
 {
_id: _design/foo,
_rev: 1-19b6ac05cd5e878bbe8193c3fbce57bb,
language: javascript,
views: {
foo: {
map: function(doc) {emit(1,2);}
}
}
 }
 Which fails miserably. 
 $ curl http://127.0.0.1:5984/argh/_design/foo/_views/bar
 [Thu, 22 Jul 2010 13:27:53 GMT] [error] [0.1015.0] Uncaught error in HTTP 
 request: {error,
  {badarity,
   {#Funcouch_httpd_db.5.100501499,
[{httpd,
  {mochiweb_request,#Port0.2266,'GET',
   /argh/_design/foo/_views/bar,
   {1,1},
   {3,
{user-agent,
 {'User-Agent',
  curl/7.19.7 
 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3},
 {host,
  {'Host',127.0.0.1:5984},
  {accept,{'Accept',*/*},nil,nil},
  nil},
 nil}}},
  127.0.0.1,'GET',
  [argh,_design,foo,
   _views,bar],
  {dict,5,16,16,8,80,48,
   {[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
   {{[[_design|
   #Funcouch_httpd.8.61263750]],
 [],
 [[_view_cleanup|
   #Funcouch_httpd.8.61263750]],
 [],[],[],[],[],
 [[_compact|
   #Funcouch_httpd.8.61263750]],
 [],[],
 [[_temp_view|
   #Funcouch_httpd.8.61263750]],
 [[_changes|
   #Funcouch_httpd.8.61263750]],
 [],[],[]}}},
  {user_ctx,null,
   [_admin],
   {couch_httpd_auth, 
 default_authentication_handler}},
  undefined,
  {dict,6,16,16,8,80,48,
   {[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
   {{[],
 [[_show|
   #Funcouch_httpd.10.132977763]],
 [[_info|
   #Funcouch_httpd.10.132977763],
  [_list|
   #Funcouch_httpd.10.132977763]],
 [[_update|
   #Funcouch_httpd.10.132977763]],
 [],[],[],[],[],
 [[_rewrite|
   #Funcouch_httpd.10.132977763]],
 [],[],[],
 [[_view|
   #Funcouch_httpd.10.132977763]],
 [],[]}}},
  undefined,#Funcouch_httpd.6.96187723,
  {dict,13,16,16,8,80,48,
   

[jira] Commented: (COUCHDB-831) badarity

2010-07-22 Thread Harry Vangberg (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12891153#action_12891153
 ] 

Harry Vangberg commented on COUCHDB-831:


My mistake. But the error is the same:

$ curl http://127.0.0.1:5984/argh/_design/foo/_views/foo
{error:badarity,reason:{#Funcouch_httpd_db.5.100501499,
 [{httpd,
  {mochiweb_request,#Port0.2181,'GET',\/argh/_design/foo/_views/foo\,
  {1,1},
  {3,
   {\user-agent\,
{'User-Agent',
\curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 
OpenSSL/0.9.8l zlib/1.2.3\},
{\host\,
 {'Host',\127.0.0.1:5984\},
 {\accept\,{'Accept',\*/*\},nil,nil},
 nil},
nil}}},
  \127.0.0.1\,'GET',
  [\argh\,\_design\,\foo\,\_views\,\foo\],
  {dict,5,16,16,8,80,48,
  {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
  {{[[\_design\|#Funcouch_httpd.8.61263750]],
[],
[[\_view_cleanup\|#Funcouch_httpd.8.61263750]],
[],[],[],[],[],
[[\_compact\|#Funcouch_httpd.8.61263750]],
[],[],
[[\_temp_view\|#Funcouch_httpd.8.61263750]],
[[\_changes\|#Funcouch_httpd.8.61263750]],
[],[],[]}}},
  {user_ctx,null,
  [\_admin\],
  \{couch_httpd_auth, default_authentication_handler}\},
  undefined,
  {dict,6,16,16,8,80,48,
  {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
  {{[],
[[\_show\|#Funcouch_httpd.10.132977763]],
[[\_info\|#Funcouch_httpd.10.132977763],
 [\_list\|#Funcouch_httpd.10.132977763]],
[[\_update\|#Funcouch_httpd.10.132977763]],
[],[],[],[],[],
[[\_rewrite\|#Funcouch_httpd.10.132977763]],
[],[],[],
[[\_view\|#Funcouch_httpd.10.132977763]],
[],[]}}},
  undefined,#Funcouch_httpd.6.96187723,
  {dict,13,16,16,8,80,48,
  {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
  {{[[\_restart\|#Funcouch_httpd.6.96187723],
 [\_replicate\|#Funcouch_httpd.6.96187723]],
[[\_active_tasks\|#Funcouch_httpd.6.96187723]],
[],[],
[[\_utils\|#Funcouch_httpd.5.8198673],
 [\/\|#Funcouch_httpd.5.8198673],
 [\_config\|#Funcouch_httpd.6.96187723]],
[[\_log\|#Funcouch_httpd.6.96187723]],
[],[],
[[\_all_dbs\|#Funcouch_httpd.6.96187723]],
[],
[[\_stats\|#Funcouch_httpd.6.96187723],
 [\favicon.ico\|#Funcouch_httpd.5.8198673]],
[[\_session\|#Funcouch_httpd.6.96187723],
 [\_uuids\|#Funcouch_httpd.6.96187723]],
[],[],
[[\_oauth\|#Funcouch_httpd.6.96187723]],
[],
  {db,0.135.0,0.136.0,nil,\1279805632879706\,0.133.0,0.137.0,
  {db_header,5,3,0,{8422,{1,0}},{8594,1},nil,0,nil,nil,1000},
  3,
  {btree,0.133.0,
  {8422,{1,0}},
  #Funcouch_db_updater.7.69395062,#Funcouch_db_updater.8.86519079,
  #Funcouch_btree.5.124754102,#Funcouch_db_updater.9.24674233},
  {btree,0.133.0,
  {8594,1},
  #Funcouch_db_updater.10.90337910,
  #Funcouch_db_updater.11.13595824,#Funcouch_btree.5.124754102,
  #Funcouch_db_updater.12.34906778},
  {btree,0.133.0,nil,#Funcouch_btree.0.83553141,
  #Funcouch_btree.1.30790806,#Funcouch_btree.2.124754102,nil},
  3,\argh\,\/usr/local/var/lib/couchdb/argh.couch\,[],[],nil,
  {user_ctx,null,
  [\_admin\],
  \{couch_httpd_auth, default_authentication_handler}\},
  nil,1000,
  [before_header,after_header,on_file_open],
  false},
  {doc,\_design/foo\,
  {3,
   [253,95,22,127,41,225,75,9,175,16,133,117,72,72,185,226,
158,91,151,221,123,187,110,42,88,89,65,136,150,26,162,60,
25,182,172,5,205,94,135,139,190,129,147,195,251,206,87,187]},
  {[{\language\,\javascript\},
{\views\,
 {[{\foo\,{[{\map\,\function(doc) 
{emit(1,2);}\}]}}]}}]},
  [],false,[]}]}}

 badarity
 

 Key: COUCHDB-831
 URL: https://issues.apache.org/jira/browse/COUCHDB-831
 Project: CouchDB
  Issue Type: Bug
Affects Versions: 1.0
 Environment: mac os x
Reporter: Harry Vangberg

 I have an empty database with nothing but this design document:
 {
_id: _design/foo,
_rev: 1-19b6ac05cd5e878bbe8193c3fbce57bb,
language: javascript,
views: {
foo: {
map: function(doc) {emit(1,2);}
}
}
 }
 Which fails miserably. 
 $ curl http://127.0.0.1:5984/argh/_design/foo/_views/bar
 [Thu, 22 Jul 2010 13:27:53 GMT] [error] [0.1015.0] Uncaught error in HTTP 
 request: {error,
  {badarity,
   

[jira] Commented: (COUCHDB-831) badarity

2010-07-22 Thread Sebastian Cohnen (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12891155#action_12891155
 ] 

Sebastian Cohnen commented on COUCHDB-831:
--

Ignore my comment, pls :)

 badarity
 

 Key: COUCHDB-831
 URL: https://issues.apache.org/jira/browse/COUCHDB-831
 Project: CouchDB
  Issue Type: Bug
Affects Versions: 1.0
 Environment: mac os x
Reporter: Harry Vangberg

 I have an empty database with nothing but this design document:
 {
_id: _design/foo,
_rev: 1-19b6ac05cd5e878bbe8193c3fbce57bb,
language: javascript,
views: {
foo: {
map: function(doc) {emit(1,2);}
}
}
 }
 Which fails miserably. 
 $ curl http://127.0.0.1:5984/argh/_design/foo/_views/bar
 [Thu, 22 Jul 2010 13:27:53 GMT] [error] [0.1015.0] Uncaught error in HTTP 
 request: {error,
  {badarity,
   {#Funcouch_httpd_db.5.100501499,
[{httpd,
  {mochiweb_request,#Port0.2266,'GET',
   /argh/_design/foo/_views/bar,
   {1,1},
   {3,
{user-agent,
 {'User-Agent',
  curl/7.19.7 
 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3},
 {host,
  {'Host',127.0.0.1:5984},
  {accept,{'Accept',*/*},nil,nil},
  nil},
 nil}}},
  127.0.0.1,'GET',
  [argh,_design,foo,
   _views,bar],
  {dict,5,16,16,8,80,48,
   {[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
   {{[[_design|
   #Funcouch_httpd.8.61263750]],
 [],
 [[_view_cleanup|
   #Funcouch_httpd.8.61263750]],
 [],[],[],[],[],
 [[_compact|
   #Funcouch_httpd.8.61263750]],
 [],[],
 [[_temp_view|
   #Funcouch_httpd.8.61263750]],
 [[_changes|
   #Funcouch_httpd.8.61263750]],
 [],[],[]}}},
  {user_ctx,null,
   [_admin],
   {couch_httpd_auth, 
 default_authentication_handler}},
  undefined,
  {dict,6,16,16,8,80,48,
   {[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
   {{[],
 [[_show|
   #Funcouch_httpd.10.132977763]],
 [[_info|
   #Funcouch_httpd.10.132977763],
  [_list|
   #Funcouch_httpd.10.132977763]],
 [[_update|
   #Funcouch_httpd.10.132977763]],
 [],[],[],[],[],
 [[_rewrite|
   #Funcouch_httpd.10.132977763]],
 [],[],[],
 [[_view|
   #Funcouch_httpd.10.132977763]],
 [],[]}}},
  undefined,#Funcouch_httpd.6.96187723,
  {dict,13,16,16,8,80,48,
   {[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
   {{[[_restart|
   #Funcouch_httpd.6.96187723],
  [_replicate|
   

[jira] Commented: (COUCHDB-831) badarity

2010-07-22 Thread Harry Vangberg (JIRA)

[ 
https://issues.apache.org/jira/browse/COUCHDB-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12891184#action_12891184
 ] 

Harry Vangberg commented on COUCHDB-831:


http://127.0.0.1:5984/argh/_design/foo/_views/bar - _view not _views.

Thanks Chris. 404'ing it might be a good idea.

 badarity
 

 Key: COUCHDB-831
 URL: https://issues.apache.org/jira/browse/COUCHDB-831
 Project: CouchDB
  Issue Type: Bug
Affects Versions: 1.0
 Environment: mac os x
Reporter: Harry Vangberg

 I have an empty database with nothing but this design document:
 {
_id: _design/foo,
_rev: 1-19b6ac05cd5e878bbe8193c3fbce57bb,
language: javascript,
views: {
foo: {
map: function(doc) {emit(1,2);}
}
}
 }
 Which fails miserably. 
 $ curl http://127.0.0.1:5984/argh/_design/foo/_views/bar
 [Thu, 22 Jul 2010 13:27:53 GMT] [error] [0.1015.0] Uncaught error in HTTP 
 request: {error,
  {badarity,
   {#Funcouch_httpd_db.5.100501499,
[{httpd,
  {mochiweb_request,#Port0.2266,'GET',
   /argh/_design/foo/_views/bar,
   {1,1},
   {3,
{user-agent,
 {'User-Agent',
  curl/7.19.7 
 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3},
 {host,
  {'Host',127.0.0.1:5984},
  {accept,{'Accept',*/*},nil,nil},
  nil},
 nil}}},
  127.0.0.1,'GET',
  [argh,_design,foo,
   _views,bar],
  {dict,5,16,16,8,80,48,
   {[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
   {{[[_design|
   #Funcouch_httpd.8.61263750]],
 [],
 [[_view_cleanup|
   #Funcouch_httpd.8.61263750]],
 [],[],[],[],[],
 [[_compact|
   #Funcouch_httpd.8.61263750]],
 [],[],
 [[_temp_view|
   #Funcouch_httpd.8.61263750]],
 [[_changes|
   #Funcouch_httpd.8.61263750]],
 [],[],[]}}},
  {user_ctx,null,
   [_admin],
   {couch_httpd_auth, 
 default_authentication_handler}},
  undefined,
  {dict,6,16,16,8,80,48,
   {[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
   {{[],
 [[_show|
   #Funcouch_httpd.10.132977763]],
 [[_info|
   #Funcouch_httpd.10.132977763],
  [_list|
   #Funcouch_httpd.10.132977763]],
 [[_update|
   #Funcouch_httpd.10.132977763]],
 [],[],[],[],[],
 [[_rewrite|
   #Funcouch_httpd.10.132977763]],
 [],[],[],
 [[_view|
   #Funcouch_httpd.10.132977763]],
 [],[]}}},
  undefined,#Funcouch_httpd.6.96187723,
  {dict,13,16,16,8,80,48,
   {[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[],[]},
   {{[[_restart|
   #Funcouch_httpd.6.96187723],