yigit / android-priority-jobqueue

A Job Queue specifically written for Android to easily schedule jobs (tasks) that run in the background, improving UX and application stability.
3.4k stars 395 forks source link

android.database.sqlite.SQLiteDatabaseLockedException: database is locked #437

Open angebagui opened 6 years ago

angebagui commented 6 years ago

Fatal Exception: android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5) at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(SQLiteConnection.java) at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:798) at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788) at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86) at com.birbit.android.jobqueue.persistentQueue.sqlite.SqliteJobQueue.insertOrReplace(SqliteJobQueue.java:191) at com.birbit.android.jobqueue.cachedQueue.CachedJobQueue.insertOrReplace(CachedJobQueue.java:39) at com.birbit.android.jobqueue.JobManagerThread.reAddJob(JobManagerThread.java:550) at com.birbit.android.jobqueue.JobManagerThread.insertOrReplace(JobManagerThread.java:544) at com.birbit.android.jobqueue.JobManagerThread.handleRunJobResult(JobManagerThread.java:492) at com.birbit.android.jobqueue.JobManagerThread.access$300(JobManagerThread.java:35) at com.birbit.android.jobqueue.JobManagerThread$1.handleMessage(JobManagerThread.java:237) at com.birbit.android.jobqueue.messaging.PriorityMessageQueue.consume(PriorityMessageQueue.java:39) at com.birbit.android.jobqueue.JobManagerThread.run(JobManagerThread.java:222) at java.lang.Thread.run(Thread.java:761)

barisatalay commented 6 years ago

SQLite database supports only one connection. You get this warning when you try to access a table that is used.

angebagui commented 6 years ago

I try just to add a job in background. So what can i do ?