You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by paul jobs <we...@gmail.com> on 2008/12/30 10:07:45 UTC

couchdb errors -

http://rafb.net/p/oz8VfH95.html
[Tue, 30 Dec 2008 09:04:46 GMT] [info] [<0.134.0>] OS Process Log Message:
function raised exception (Cannot encode 'undefined' value as JSON) with
doc._id bef1111175e1d5052e9c49db546b39db

[Tue, 30 Dec 2008 09:04:46 GMT] [info] [<0.134.0>] OS Process Log Message:
function raised exception (Cannot encode 'undefined' value as JSON) with
doc._id 1f19420eb59e7b551e906b09f128533c

[Tue, 30 Dec 2008 09:04:46 GMT] [info] [<0.134.0>] OS Process Log Message:
function raised exception (Cannot encode 'undefined' value as JSON) with
doc._id 479326b15550588360fea0e37c47c703

[Tue, 30 Dec 2008 09:04:46 GMT] [info] [<0.134.0>] OS Process Log Message:
function raised exception (Cannot encode 'undefined' value as JSON) with
doc._id ac16639a238a743d444acaa225451f54

this comes in like 1000 times in one instant nd then stops and then comes
again

URL: http://rafb.net/p/Q3pvqv29.html

Please let me know how i can help debug this. Let me know what details you
need

$ couchdb -V
couchdb - Apache CouchDB 0.9.0a730073-incubating

Re: couchdb errors -

Posted by Alan Bell <al...@theopenlearningcentre.com>.
I reorganised it on one page for the moment and put in the table of 
contents. Are there error numbers or error codes that could be used as 
the anchor references?

http://wiki.apache.org/couchdb/Error_messages#functionraisedexceptionCannotencodeundefinedvalueasJSON

Jan Lehnardt wrote:
> Hi Alan,
>
> I think:
>   1) the wiki page that now lists install & runtime errors should be 
> split up in separate install & runtime error pages.
>   2) the pages should get an index like 
> http://wiki.apache.org/couchdb/Frequently_asked_questions that adds 
> #anchors for direct links.
>
> Anybody wants to tackle this? Be our hero!
>
> Cheers
> Jan
> -- 
>
> On 30 Dec 2008, at 12:17, Alan Bell wrote:
>
>> OK, so Jan's full reply there was a near-perfect error message. 
>> Informative, useful and a proper explanation. So how do we get 
>> "Cannot encode 'undefined' value as JSON" to include a link to a wiki 
>> page with Jan's reply on it?
>>
>> Alan.
>>
>>
>> Jan Lehnardt wrote:
>>>
>>> On 30 Dec 2008, at 10:07, paul jobs wrote:
>>>
>>>> http://rafb.net/p/oz8VfH95.html
>>>> [Tue, 30 Dec 2008 09:04:46 GMT] [info] [<0.134.0>] OS Process Log 
>>>> Message:
>>>> function raised exception (Cannot encode 'undefined' value as JSON) 
>>>> with
>>>> doc._id bef1111175e1d5052e9c49db546b39db
>>>
>>> Your Javascript is using an object member that is not defined. E.g.:
>>>
>>> {
>>>  "_id":"XYZ123",
>>>  "_rev":"1BB2BB",
>>>  "field":"value"
>>> }
>>>
>>> map: function(doc) {
>>>  emit(doc.name, doc.address);
>>> }
>>>
>>> instead, try this:
>>>
>>> map: function(doc) {
>>>  if(doc.name && doc.address) {
>>>    emit(doc.name, doc.address);
>>>  }
>>> }
>>> Cheers,
>>> Jan
>>
>>
>


Re: couchdb errors -

Posted by Jan Lehnardt <ja...@apache.org>.
Hi Alan,

I think:
   1) the wiki page that now lists install & runtime errors should be  
split up in separate install & runtime error pages.
   2) the pages should get an index like http://wiki.apache.org/couchdb/Frequently_asked_questions 
  that adds #anchors for direct links.

Anybody wants to tackle this? Be our hero!

Cheers
Jan
--

On 30 Dec 2008, at 12:17, Alan Bell wrote:

> OK, so Jan's full reply there was a near-perfect error message.  
> Informative, useful and a proper explanation. So how do we get  
> "Cannot encode 'undefined' value as JSON" to include a link to a  
> wiki page with Jan's reply on it?
>
> Alan.
>
>
> Jan Lehnardt wrote:
>>
>> On 30 Dec 2008, at 10:07, paul jobs wrote:
>>
>>> http://rafb.net/p/oz8VfH95.html
>>> [Tue, 30 Dec 2008 09:04:46 GMT] [info] [<0.134.0>] OS Process Log  
>>> Message:
>>> function raised exception (Cannot encode 'undefined' value as  
>>> JSON) with
>>> doc._id bef1111175e1d5052e9c49db546b39db
>>
>> Your Javascript is using an object member that is not defined. E.g.:
>>
>> {
>>  "_id":"XYZ123",
>>  "_rev":"1BB2BB",
>>  "field":"value"
>> }
>>
>> map: function(doc) {
>>  emit(doc.name, doc.address);
>> }
>>
>> instead, try this:
>>
>> map: function(doc) {
>>  if(doc.name && doc.address) {
>>    emit(doc.name, doc.address);
>>  }
>> }
>> Cheers,
>> Jan
>
>


Re: couchdb errors -

Posted by Alan Bell <al...@theopenlearningcentre.com>.
OK, so Jan's full reply there was a near-perfect error message. 
Informative, useful and a proper explanation. So how do we get "Cannot 
encode 'undefined' value as JSON" to include a link to a wiki page with 
Jan's reply on it?

Alan.


Jan Lehnardt wrote:
>
> On 30 Dec 2008, at 10:07, paul jobs wrote:
>
>> http://rafb.net/p/oz8VfH95.html
>> [Tue, 30 Dec 2008 09:04:46 GMT] [info] [<0.134.0>] OS Process Log 
>> Message:
>> function raised exception (Cannot encode 'undefined' value as JSON) with
>> doc._id bef1111175e1d5052e9c49db546b39db
>
> Your Javascript is using an object member that is not defined. E.g.:
>
> {
>   "_id":"XYZ123",
>   "_rev":"1BB2BB",
>   "field":"value"
> }
>
> map: function(doc) {
>   emit(doc.name, doc.address);
> }
>
> instead, try this:
>
> map: function(doc) {
>   if(doc.name && doc.address) {
>     emit(doc.name, doc.address);
>   }
> }
> Cheers,
> Jan


Re: couchdb errors -

Posted by Jan Lehnardt <ja...@apache.org>.
On 30 Dec 2008, at 10:07, paul jobs wrote:

> http://rafb.net/p/oz8VfH95.html
> [Tue, 30 Dec 2008 09:04:46 GMT] [info] [<0.134.0>] OS Process Log  
> Message:
> function raised exception (Cannot encode 'undefined' value as JSON)  
> with
> doc._id bef1111175e1d5052e9c49db546b39db

Your Javascript is using an object member that is not defined. E.g.:

{
   "_id":"XYZ123",
   "_rev":"1BB2BB",
   "field":"value"
}

map: function(doc) {
   emit(doc.name, doc.address);
}

instead, try this:

map: function(doc) {
   if(doc.name && doc.address) {
     emit(doc.name, doc.address);
   }
}
Cheers,
Jan
--