I had now my Zimbra Desktop 2.0.1 crashing twice and giving me this error:
The problem: Zimbra Desktop stores some information about mailbox folders and messages in sqlite databases so it can access the messages faster. These databases can sometimes become corrupt.
WARNING: It has worked for me, but you may loose all your data
In the Zimbra Directory where all your user data is, you will find a directory called sqlite, in this directory you will find files like:
Do not worry about files ending with .db-journal
For each file ending with .db do the following:
You can do all the files in one go, or do one at a time, and see if the problem is fixed. It is hard from the log to find which file is corrupted, so try your luck.
The .dump command tells sqlite to dump in a txt format the mboxgroup1.db database and then to reload this txt format into the mboxgroup1.newdb database
This effectively repairs and compacts the database.
2011-04-06 23:47:07,163 FATAL [sync-manager-init] [] system - Unable to commit database transaction. Forcing server to abort. com.zimbra.common.service.ServiceException: system failure: committing database transaction ExceptionId:sync-manager-init:1302090427162:3c3d85a6c03d400e Code:service.FAILURE at com.zimbra.common.service.ServiceException.FAILURE(ServiceException.java:248) at com.zimbra.cs.db.DbPool$Connection.commit(DbPool.java:125) at com.zimbra.cs.mailbox.Mailbox.endTransaction(Mailbox.java:7017) at com.zimbra.cs.mailbox.Mailbox.getConfig(Mailbox.java:1277) at com.zimbra.cs.mailbox.Mailbox.finishInitialization(Mailbox.java:443) at com.zimbra.cs.mailbox.DesktopMailbox.finishInitialization(DesktopMailbox.java:79) at com.zimbra.cs.mailbox.SyncMailbox.finishInitialization(SyncMailbox.java:90) at com.zimbra.cs.mailbox.DataSourceMailbox.finishInitialization(DataSourceMailbox.java:131) at com.zimbra.cs.mailbox.MailboxManager.getMailboxById(MailboxManager.java:483) at com.zimbra.cs.mailbox.MailboxManager.getMailboxByAccountId(MailboxManager.java:336) at com.zimbra.cs.mailbox.MailboxManager.getMailboxByAccount(MailboxManager.java:272) at com.zimbra.cs.mailbox.MailboxManager.getMailboxByAccount(MailboxManager.java:231) at com.zimbra.cs.offline.OfflineSyncManager.backgroundInit(OfflineSyncManager.java:728) at com.zimbra.cs.offline.OfflineSyncManager.access$400(OfflineSyncManager.java:70) at com.zimbra.cs.offline.OfflineSyncManager$1.run(OfflineSyncManager.java:650) at java.lang.Thread.run(Thread.java:680) Caused by: java.sql.SQLException: SQL logic error or missing database at org.sqlite.DB.throwex(DB.java:361) at org.sqlite.DB.exec(DB.java:76) at org.sqlite.Conn.commit(Conn.java:342) at com.zimbra.cs.db.DebugConnection.commit(DebugConnection.java:42) at com.zimbra.cs.db.RetryConnection.superCommit(RetryConnection.java:120) at com.zimbra.cs.db.RetryConnection.access$000(RetryConnection.java:11) at com.zimbra.cs.db.RetryConnection$7.execute(RetryConnection.java:112) at com.zimbra.cs.db.AbstractRetry.doRetry(AbstractRetry.java:44) at com.zimbra.cs.db.RetryConnection.commit(RetryConnection.java:116) at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:301) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:200) at com.zimbra.cs.db.DbPool$Connection.commit(DbPool.java:123) ... 14 more
The problem: Zimbra Desktop stores some information about mailbox folders and messages in sqlite databases so it can access the messages faster. These databases can sometimes become corrupt.
WARNING: It has worked for me, but you may loose all your data
In the Zimbra Directory where all your user data is, you will find a directory called sqlite, in this directory you will find files like:
mboxgroup1.db mboxgroup1.db-journal
Do not worry about files ending with .db-journal
For each file ending with .db do the following:
echo .dump | sqlite3 mboxgroup1.db | sqlite3 mboxgroup1.newdb mv mboxgroup1.newdb mboxgroup1.db
You can do all the files in one go, or do one at a time, and see if the problem is fixed. It is hard from the log to find which file is corrupted, so try your luck.
The .dump command tells sqlite to dump in a txt format the mboxgroup1.db database and then to reload this txt format into the mboxgroup1.newdb database
This effectively repairs and compacts the database.

