couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damien Katz <dam...@apache.org>
Subject Re: map_process_error caused by JSON array?
Date Mon, 14 Jul 2008 17:28:05 GMT
Can you create javascript test code that exhibits this failure? That  
would be a big help for us to debug this.

-Damien

On Jul 14, 2008, at 1:12 PM, Jacinto Shy II wrote:

> On Sun, Jul 13, 2008 at 5:01 AM, Jan Lehnardt <jan@apache.org> wrote:
>>
>> On Jul 13, 2008, at 2:50 , Jacinto Shy II wrote:
>>
>>> On Sat, Jul 12, 2008 at 5:54 PM, Jan Lehnardt <jan@apache.org>  
>>> wrote:
>>>>
>>>> Hello Jacinto,
>>>>
>>>> On Jul 11, 2008, at 23:21 , Jacinto Shy II wrote:
>>>>>
>>>>> [...]
>>
>> What do you requests look like and what is your design document,
>> including the map / reduce functions?
>>
>
> I don't think my requests are the issue, as I see the same problem if
> I create a document with an array inside Futon. If I delete the field
> containing the array the error goes away.
>
> That said, I have the following design documents in my database:
>
> {"_id":"_design\/Channel",
> "_rev":"493366243",
> "language":"javascript",
> "views":{
>  "user_id":{"map":"function(doc) {\n                if (doc.type ==
> 'Channel')\n                    emit(doc.user_id, doc._id);\n
>  }\n            "},
>  "all":{"map":"function (doc) {\n                if (doc.type ==
> 'Channel')\n                    emit(null, doc._id);\n            }\n
>          "},
>  "user_name":{"map":"function(doc) {\n                if (doc.type ==
> 'Channel')\n                    emit(doc.user_name, doc._id);\n
>    }\n            "},
>  "uri":{"map":"function(doc) {\n                if (doc.type ==
> 'Channel')\n                    emit(doc.uri, doc._id);\n
> }\n            "}}}
>
>
> {"_id":"_design\/License",
> "_rev":"2403668253",
> "language":"javascript",
> "views":{
>  "all":{"map":"function (doc) {\n                if (doc.type ==
> 'License')\n                    emit(null, doc._id);\n            }\n
>          "},
>  "code":{"map":"function(doc) {\n                if (doc.type ==
> 'License')\n                    emit(doc.code, doc._id);\n
> }\n            "}}}
>
>
> {"_id":"_design\/Person",
> "_rev":"1587266414",
> "language":"javascript",
> "views":{
>  "username":{"map":"function(doc) {\n                if (doc.type ==
> 'Person')\n                    emit(doc.username, doc._id)\n
> }\n            "},
>  "all":{"map":"function (doc) {\n                if (doc.type ==
> 'Person')\n                    emit(null, doc._id);\n            }\n
>         "},
>  "email":{"map":"function(doc) {\n                if (doc.type ==
> 'Person')\n                    emit(doc.email, doc._id);\n
> }\n            "}}}
>
>
> {"_id":"_design\/Stream",
> "_rev":"1800837326",
> "language":"javascript",
> "views":{
>  "all":{"map":"function (doc) {\n                if (doc.type ==
> 'Stream')\n                    emit(null, doc._id);\n            }\n
>         "},
>  "user_id":{"map":"function(doc) {\n                if (doc.type ==
> 'Stream')\n                    emit(doc.user_id, doc._id);\n
> }\n            "}}}
>
>>
>>>
>>>
>>> The document that is saved by CouchDB appears just fine  
>>> (formatting my
>>> own):
>>>
>>> {"_id":"5607847acf0772f75939b6d75ab700de",
>>> "_rev":"1254795349",
>>> "created_on":"2008-07-13 10:26:35",
>>> "user_id":"21b3a56d280ee633b3c3d8d5b9a57fbf",
>>> "title":"Waheshni Eih",
>>> "tags":["song","dance"],
>>> "user_name":"ali",
>>> "license_id":"6445c7216d601e543beaf8a8fd5d6a3c",
>>> "channel_id":"9ff014d1e86cb7ecfa8fb01df7a783b9",
>>> "type":"Stream"}
>>>
>>>>> [...]
>>>>> I also see the same error when running the test suite for reduce,
>>>>> multiple_rows, view_collation, view_conflicts, view_errors, and
>>>>> view_sandboxing.
>>>>
>>>> Do the basic tests run for you? If not, it appears that your  
>>>> SpiderMonkey
>>>> installation is hosed. See
>>>> http://wiki.apache.org/couchdb/InstallingSpiderMonkey
>>>> for more info.
>>>
>>> The basic tests are successful, and so are all of the other tests,
>>> with the exception of the six listed above. I am using the
>>> SpiderMonkey which is installed by apt-get. I just upgraded to
>>> 1.9~rc2-5, but the problem persists.
>>
>>
>> Which browser are you using to run the tests?
>
> I am using Firefox 3 on Linux and Windows for the tests.
>
>> Cheers
>> Jan
>> --
>>
>
> Regards,
>
> -- 
> Jacinto


Mime
View raw message