[JCBC-72] View query returns null Created: 05/Jul/12  Updated: 11/Jul/12  Resolved: 11/Jul/12

Status: Resolved
Project: Couchbase Java Client
Component/s: Core
Affects Version/s: 1.1dp
Fix Version/s: 1.1dp2
Security Level: Public

Type: Bug Priority: Critical
Reporter: Sharon Barr (Inactive) Assignee: Mike Wiederhold
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
viewResponse return null, and i can't figure out why:

• I execute my code
CouchbaseClient c = new CouchbaseClient(baseURIs, "default", "");
View view = c.getView("dev_lenders", "country_count");

Query query = new Query();
Stale stale=Stale.OK;
query.setStale(stale);
query.setGroup(true);
ViewResponse viewResponse = c.query(view, query);

• My viewRespons is null.

• Checking the couchdb.1 log, I see:
[couchdb:info] [2012-07-04 21:40:50] [ns_1@127.0.0.1:<0.24865.33>:couch_log:info:39] 10.32.5.29 - - GET /default/_design/dev_lenders/_view/country_count?group=true&stale=ok 200

• Running this URL directly against my server I do get results:
http://10.2.1.12:8092/default/_design/dev_lenders/_view/country_count?group=true&stale=ok
{"rows":[
{"key":null,"value":4171},
{"key":"AE","value":5},
{"key":"AF","value":1},
{"key":"AM","value":2},
...


Not sure what logs i can provide to debug this further. let me know how i can help.

 Comments   
Comment by Sharon Barr (Inactive) [ 05/Jul/12 ]
On slight variation from the above issue, i did mange to get an error from the server via the HTTP request
{"error":"query_parse_error","reason":"Invalid URL parameter 'group' or 'group_level' for non-reduce view."}

but the client still returns null.
Comment by Mike Wiederhold [ 09/Jul/12 ]
http://review.couchbase.org/#change,18094
Generated at Thu Oct 30 11:52:49 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.