[ 
https://issues.apache.org/jira/browse/COUCHDB-3313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15893759#comment-15893759
 ] 

Vartika Jain commented on COUCHDB-3313:
---------------------------------------

I have edited the question please have a look. I tried to search for the newer 
version but failed to find it. help me if you know about the new version of 
couchdb4j.

> Couchdb 2.0- Unable to create document and access database through java api
> ---------------------------------------------------------------------------
>
>                 Key: COUCHDB-3313
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-3313
>             Project: CouchDB
>          Issue Type: Question
>            Reporter: Vartika Jain
>
> I already have my running project on couchdb 1.6 , now I want to try couchb 
> 2.0. I am able to create database through java api on couchdb 2.0 but unable 
> to access it and create a new document.
> Its giving error of update_seq.
> Caused by: 
> net.sf.json.JSONException: JSONObject["update_seq"] is not a number
> The update_seq must be return as number but when we run the request
> http://192.168.1.48:5984/testing **(CouchDb 2.0)**the response is
> {"db_name":"testing","update_seq":"0-g1AAAAFTeJzLYWBg4MhgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUoxJTIkyf___z8rkQGPoiQFIJlkT1idA0hdPGF1CSB19QTV5bEASYYGIAVUOp8YtQsgavcTo_YARO19YtQ-gKgFuTcLANRjby4","sizes":{"file":33952,"external":0,"active":0},"purge_seq":0,"other":{"data_size":0},"doc_del_count":0,"doc_count":0,"disk_size":33952,"disk_format_version":6,"data_size":0,"compact_running":false,"instance_start_time":"0"}
> In olderversion in response its giving an integer value.
> Whats the issue?
> using couchdb4j jar 0.1.2
> /*****************EDIT 1****************************/
> According to official doc of couchDb 2.0 
> http://docs.couchdb.org/en/2.0.0/api/database/common.html
> GET /{db} Gets information about the specified database.
> Parameters: db – Database name Request Headers:
> Accept – application/json text/plain
> Response Headers:
> Content-Type –
> application/json
> text/plain; charset=utf-8
> Response JSON Object:
> committed_update_seq (number) – The number of committed update.
> compact_running (boolean) – Set to true if the database compaction routine is 
> operating on this database.
> db_name (string) – The name of the database.
> disk_format_version (number) – The version of the physical format used for 
> the data when it is stored on disk.
> data_size (number) – The number of bytes of live data inside the database 
> file.
> disk_size (number) – The length of the database file on disk. Views indexes 
> are not included in the calculation.
> doc_count (number) – A count of the documents in the specified database.
> doc_del_count (number) – Number of deleted documents
> instance_start_time (string) – Timestamp of when the database was opened, 
> expressed in microseconds since the epoch.
> purge_seq (number) – The number of purge operations on the database.
> **update_seq (number) – The current number of updates to the database.**



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to