Judging by this line:
Caused by: com.almworks.sqlite4java.SQLiteException: [-92] DB[1] is not confined or already disposed
And on the previous line
at com.almworks.sqlite4java.SQLiteConnection.checkThread(SQLiteConnection.java:1386)
we can conclude that what checkThread does checks whether the request in the thread that the database originally created is running and that the check does NOT pass.
Make sure you create and query the database in the same thread. Basically, you should allocate a separate thread for database operations.
Here's the checkThread() method from sources :
void checkThread() throws SQLiteException { Thread confinement = myConfinement; if (confinement == null) { throw new SQLiteException(WRAPPER_MISUSE, this + " is not confined or already disposed"); } ... }
And myConfinement is null -ed in the dispose() method. Thus, also make sure that you do not have dispose() -ed from the connection.
source share