lightcouch / LightCouch

CouchDB Java API
www.lightcouch.org
Apache License 2.0
67 stars 70 forks source link

Couchdb 2.3 changed the purge_seq field in the `DbInfo` response to be a string. This now throws java.lang.NumberFormatException #73

Open simon-temple opened 5 years ago

simon-temple commented 5 years ago

Maybe need to add purge_seq getter on DbInfo class that returns seq as String

Here's the stack trace:

jvm 1 | com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: "0-g1AAAABXeJzLYWBgYMpgTmEQTM4vTc5ISXLIyU9OzMnILy7JAUnlsQBJhgYg9R8IshIZ8KhNZEiqhyjKAgBm5Rxs" jvm 1 | at com.google.gson.internal.bind.TypeAdapters$11.read(TypeAdapters.java:306) jvm 1 | at com.google.gson.internal.bind.TypeAdapters$11.read(TypeAdapters.java:296) jvm 1 | at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) jvm 1 | at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) jvm 1 | at com.google.gson.Gson.fromJson(Gson.java:927) jvm 1 | at com.google.gson.Gson.fromJson(Gson.java:865) jvm 1 | at org.lightcouch.CouchDbClientBase.get(CouchDbClientBase.java:553) jvm 1 | at org.lightcouch.CouchDbContext.info(CouchDbContext.java:113)

nasava commented 5 years ago

Hi Simon, I discovered the same issue for myself with CouchDB 2.3.1 and lightcouch 0.2.0. Did you find a workaround or did you switch to another lib?

The lightcouch project seems pretty inactive ...

lightcouch commented 5 years ago

Hi,

fyi, a new release of lightcouch is rolling now for the compatibility with CouchDB 2.3

best regards

chrisinmtown commented 4 years ago

Will the new release be ready soon? I don't see any commits newer than 2017, am I blind?

lightcouch commented 4 years ago

Apologies. The owner of the project was na. A new release ships today. Regards

jjrodrig commented 4 years ago

Sorry, but I dont understand why you have deleted my comment. I think that it is helpful for any one to know that there is a solution for this issue in another fork while you publish a new release with the fix.
Also, It could be helpfull for you as you can get the change from there if you whish.