Skip to content

Instantly share code, notes, and snippets.

@sproctor
Created June 28, 2022 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sproctor/2e3cfe9626d35aa7491f542ef5bc6bb3 to your computer and use it in GitHub Desktop.
Save sproctor/2e3cfe9626d35aa7491f542ef5bc6bb3 to your computer and use it in GitHub Desktop.
Exception in thread "AWT-EventQueue-0" java.sql.SQLException: The prepared statement has been finalized
at org.sqlite.core.NativeDB.throwex(NativeDB.java:487)
at org.sqlite.core.NativeDB.step(Native Method)
at org.sqlite.jdbc3.JDBC3ResultSet.next(JDBC3ResultSet.java:74)
at com.squareup.sqldelight.sqlite.driver.JdbcCursor.next(JdbcDriver.kt:221)
at com.squareup.sqldelight.Query.executeAsList(Query.kt:135)
at com.squareup.sqldelight.runtime.coroutines.FlowQuery$mapToList$1$1.invokeSuspend(FlowExtensions.kt:98)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Suppressed: java.lang.IllegalStateException: Connections must be closed on the thread that opened them
at com.squareup.sqldelight.sqlite.driver.ThreadedConnectionManager.closeConnection(JdbcSqliteDriver.kt:69)
at com.squareup.sqldelight.sqlite.driver.JdbcSqliteDriver.closeConnection(JdbcSqliteDriver.kt)
at com.squareup.sqldelight.sqlite.driver.JdbcDriver$connectionAndClose$2.invoke(JdbcDriver.kt:97)
at com.squareup.sqldelight.sqlite.driver.JdbcDriver$connectionAndClose$2.invoke(JdbcDriver.kt:97)
at com.squareup.sqldelight.sqlite.driver.JdbcCursor.close(JdbcDriver.kt:219)
at kotlin.io.CloseableKt.closeFinally(Closeable.kt:60)
at com.squareup.sqldelight.Query.executeAsList(Query.kt:136)
... 9 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment