I think if i save (mDocument.putProperties(mProperties)) error. at this time i can try call the update method ( mDocument.update(new Document.DocumentUpdater())). and i found the log: 11-07 10:20:28.390 11891-11979/com.eusoft.recite.fr E/TAG﹕ updateCardReviewInCouchBase: 8d9515d3-4a3d-49c2-bbb7-d6f335227db0 11-07 10:20:28.390 11891-11979/com.eusoft.recite.fr I/CBLite﹕ Thread-2598 Begin transaction (level 1) 11-07 10:20:28.410 11891-11979/com.eusoft.recite.fr I/CBLite﹕ Thread-2598 Committing transaction (level 1) 11-07 10:20:31.800 11891-11982/com.eusoft.recite.fr E/TAG﹕ updateCardReviewInCouchBase: 8d9515d3-4a3d-49c2-bbb7-d6f335227db0 11-07 10:20:31.810 11891-11982/com.eusoft.recite.fr I/CBLite﹕ Thread-2599 Begin transaction (level 1) *11-07 10:20:31.820 11891-11982/com.eusoft.recite.fr I/CBLite﹕ Thread-2599 CANCEL transaction (level 1)* 11-07 10:20:31.830 11891-11982/com.eusoft.recite.fr I/CBLite﹕ Thread-2599 Begin transaction (level 1) 11-07 10:20:31.840 11891-11982/com.eusoft.recite.fr I/CBLite﹕ Thread-2599 Committing transaction (level 1)
and not crash again .Am i right ??? Thanks. 在 2014年11月7日星期五UTC+8上午9时45分06秒,Traun Leyden写道: > > Can you produce some standalone code that reproduces the problem? > > > > On Thu, Nov 6, 2014 at 5:42 PM, peng liu <[email protected] <javascript:>> > wrote: > >> 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] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/mobile-couchbase/b0ffe551-50e0-4ccc-b665-326e42a2f32e%40googlegroups.com >> >> <https://groups.google.com/d/msgid/mobile-couchbase/b0ffe551-50e0-4ccc-b665-326e42a2f32e%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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/a2bab14f-1037-4bd1-b3a5-2ec76d6a402a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
