nlight-jdev / jcouchdb

Automatically exported from code.google.com/p/jcouchdb
Other
0 stars 0 forks source link

JSONParseException: Cannot set property digest on class org.jcouchdb.document.Attachment #77

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Affected versions:
jcouchdb 0.11.0, 1.0.1, head

After upgrading to couch 1.1.0, I've got the following exception:

org.svenson.JSONParseException: Cannot set property digest on class 
org.jcouchdb.document.Attachment
    at org.svenson.JSONParser.parseObjectInto(JSONParser.java:583) ~[na:na]
    at org.svenson.JSONParser.parseObjectInto(JSONParser.java:611) ~[na:na]
    at org.svenson.JSONParser.parseObjectInto(JSONParser.java:611) ~[na:na]
    at org.svenson.JSONParser.parse(JSONParser.java:396) ~[na:na]
    at org.svenson.JSONParser.parse(JSONParser.java:372) ~[na:na]
    at org.jcouchdb.db.Response.getContentAsBean(Response.java:158) ~[na:na]
    at org.jcouchdb.db.Database.getDocumentInternal(Database.java:317) ~[na:na]
    at org.jcouchdb.db.Database.getDocument(Database.java:247) ~[na:na]

...

In couch 1.1.0 a new _attachments property "digest" was added.
https://issues.apache.org/jira/browse/COUCHDB-687

Attached is a patch that fixed the issue for me.

-vasko

Original issue reported on code.google.com by vtchouma...@gmail.com on 14 Jun 2011 at 10:58

Attachments:

GoogleCodeExporter commented 8 years ago
I'll handle this one.

Original comment by smoye...@gmail.com on 29 Feb 2012 at 3:40

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r264.

Original comment by smoye...@gmail.com on 29 Feb 2012 at 7:42

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r265.

Original comment by smoye...@gmail.com on 29 Feb 2012 at 7:43

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r267.

Original comment by smoye...@gmail.com on 29 Feb 2012 at 9:13

GoogleCodeExporter commented 8 years ago
This fix has been included on the 1.1.0-1 branch

Original comment by smoye...@gmail.com on 29 Feb 2012 at 10:51

GoogleCodeExporter commented 8 years ago
Issue 80 has been merged into this issue.

Original comment by smoye...@gmail.com on 29 Feb 2012 at 10:51

GoogleCodeExporter commented 8 years ago
Issue 82 has been merged into this issue.

Original comment by smoye...@gmail.com on 23 Apr 2012 at 12:01

GoogleCodeExporter commented 8 years ago
Hello,

I am now using 1.1.0-1-SNAPSHOT locally but I still receive the 
"org.svenson.JSONParseException: Cannot set property digest on class 
org.jcouchdb.document.Attachment" error.  I have verified my Maven project is 
trying to use the updated library.  I haven't looked at the code specifically 
that is using jcouchdb, so I am wondering if there could be something wrong in 
that implementation that could still be allowing this error to occur.

Thanks.

Original comment by ngamr...@gmail.com on 14 Jul 2013 at 6:28

GoogleCodeExporter commented 8 years ago
HI,

I have created document with attachment, when i try to update the document. I 
am getting the following exception. I am using JcouchDB api..Below is the 
exception thrown

BaseDocument doc = (BaseDocument) 
db.getDocument(BaseDocument.class,”image1″);
——————————————————————————��
�——————–
Exception in thread “main” org.svenson.JSONParseException: Cannot set 
property digest on class org.jcouchdb.document.Attachment
at org.svenson.JSONParser.parseObjectInto(JSONParser.java:589)
at org.svenson.JSONParser.parseObjectInto(JSONParser.java:620)
at org.svenson.JSONParser.parseObjectInto(JSONParser.java:620)
at org.svenson.JSONParser.parse(JSONParser.java:391)
at org.svenson.JSONParser.parse(JSONParser.java:367)
at org.jcouchdb.db.Response.getContentAsBean(Response.java:158)
at org.jcouchdb.db.Database.getDocumentInternal(Database.java:317)
at org.jcouchdb.db.Database.findDocument(Database.java:280)
at com.demo.couch.CouchImageAttach.updateAttachment(CouchImageAttach.java:55)
at com.demo.couch.CouchImageAttach.main(CouchImageAttach.java:23)

Original comment by girish.m...@gmail.com on 13 Dec 2013 at 7:55