I think problem is  case by update same document  twice ? and at second 
times ,the first is not really update in couchbase ,so when i try update 
again ,it will crash ????

在 2014年11月7日星期五UTC+8上午9时24分35秒,peng liu写道:
>
> Hi.I use couchbase on android.
> But some times when i  update my doc .it will crash.
> *11-07 09:19:51.440    9487-9562/com.eusoft.recite.fr 
> <http://com.eusoft.recite.fr> W/System.err﹕ 
> com.couchbase.lite.CouchbaseLiteException: Conflicts not allowed and there 
> is already an existing doc with id: 4cd9f17d-f28f-48c9-8866-eec3a9cabe35*
> 11-07 09:19:51.440    9487-9562/com.eusoft.recite.fr W/System.err﹕ at 
> com.couchbase.lite.Database.putRevision(Database.java:3480)
> 11-07 09:19:51.440    9487-9562/com.eusoft.recite.fr W/System.err﹕ at 
> com.couchbase.lite.Database.putRevision(Database.java:3415)
> 11-07 09:19:51.440    9487-9562/com.eusoft.recite.fr W/System.err﹕ at 
> com.couchbase.lite.Document.putProperties(Document.java:415)
> 11-07 09:19:51.440    9487-9562/com.eusoft.recite.fr W/System.err﹕ at 
> com.couchbase.lite.Document.putProperties(Document.java:250)
> 11-07 09:19:51.440    9487-9562/com.eusoft.recite.fr W/System.err﹕ at 
> com.eusoft.recite.support.entities.AbstractDocument.save(AbstractDocument.java:58)
> 11-07 09:19:51.440    9487-9562/com.eusoft.recite.fr W/System.err﹕ at 
> com.eusoft.recite.support.entities.AbstractDocument.save(AbstractDocument.java:44)
> 11-07 09:19:51.440    9487-9562/com.eusoft.recite.fr W/System.err﹕ at 
> com.eusoft.recite.support.ReciteSupportController.updateCardReviewInCouchBase(ReciteSupportController.java:417)
> 11-07 09:19:51.440    9487-9562/com.eusoft.recite.fr W/System.err﹕ at 
> com.eusoft.recite.support.ReciteSupportController.answerCard(ReciteSupportController.java:815)
> 11-07 09:19:51.440    9487-9562/com.eusoft.recite.fr W/System.err﹕ at 
> com.eusoft.recite.activity.recite.ReciteActivity$5.run(ReciteActivity.java:170)
> 11-07 09:19:51.440    9487-9562/com.eusoft.recite.fr W/System.err﹕ at 
> java.lang.Thread.run(Thread.java:841)
>
> and how to fix it ?
> i found this issues:
> https://github.com/couchbase/couchbase-lite-java-core/issues/97#issuecomment-62040966
> but i have try to clean the document cache,it will crash again.
> * Database db = DBController.getInstance().getCouchDatabase();*
> *            if (db != null) {*
> *                try {*
> *                    entity.save(db);*
> *                } catch (CouchbaseLiteException e) {*
> *                    db.clearDocumentCache();*
> *                    entity.save(db);*
> *                }*
> *            }*
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/b0ffe551-50e0-4ccc-b665-326e42a2f32e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to