java.lang.RuntimeException: Unable to resume activity {mjt.shopwise/mjt.shopwise.MainActivity}: java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/data/mjt.shopwise/databases/ShopWise

Stack Overflow | MikeT | 2 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    How can I refresh/reopen an SQLite dtabase after restoring it, when using a singleton for the database helper

    Stack Overflow | 2 months ago | MikeT
    java.lang.RuntimeException: Unable to resume activity {mjt.shopwise/mjt.shopwise.MainActivity}: java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/data/mjt.shopwise/databases/ShopWise
  2. 0

    Android sqlite getdatabase called recursively

    Stack Overflow | 3 years ago | user3328547
    java.lang.RuntimeException: Unable to start activity ComponentInfo{de.vertretungsplan2/de.vertretungsplan2.Main}: java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/data/de.vertretungsplan2/databases/settings
  3. 0

    attempt to re-open an already-closed object: SQLiteDatabase: in android Sqlite

    Stack Overflow | 1 year ago | Anil
    java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/data/info.androidhive.materialdesign/databases/CartDatabse 11-14 13:10:21.914 30529-30529/info.androidhive.materialdesign E/AndroidRuntime: at android.database.sqlite.SQLiteClosable.acquireReference(SQLiteClosable.java:55) 11-14 13:10:21.914 30529-30529/info.androidhive.materialdesign E/AndroidRuntime: at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1310) 11-14 13:10:21.914 30529-30529/info.androidhive.materialdesign E/AndroidRuntime: at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1253) 11-14 13:10:21.914 30529-30529/info.androidhive.materialdesign E/AndroidRuntime: at info.androidhive.materialdesign.database.MyDatabaseHelper.productcount(MyDatabaseHelper.java:533) 11-14 13:10:21.914 30529-30529/info.androidhive.materialdesign E/AndroidRuntime: at info.androidhive.materialdesign.activity.Mainactvityfortab.onResume(Mainactvityfortab.java:269) 11-14 13:10:21.914 30529-30529/info.androidhive.materialdesign E/AndroidRuntime: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1259) 11-14 13:10:21.914 30529-30529/info.androidhive.materialdesign E/AndroidRuntime: at android.app.Activity.performResume(Activity.java:5200) 11-14 13:10:21.914 30529-30529/info.androidhive.materialdesign E/AndroidRuntime: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2931) 11-14 13:10:21.914 30529-30529/info.androidhive.materialdesign E/AndroidRuntime: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2973)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Android SQLite same cursor for multiple tables:

    Stack Overflow | 4 years ago | H P
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.songs/com.songs.MainActivity2}: java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/data/com.songs/databases/songS
  6. 0

    Something wrong when updating row in database

    Stack Overflow | 4 years ago | Marcus
    java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/data/com.example.egta/databases/egta.db

  1. bayukresno 3 times, last 11 months ago
1 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalStateException

    attempt to re-open an already-closed object: SQLiteDatabase: /data/data/mjt.shopwise/databases/ShopWise

    at android.database.sqlite.SQLiteClosable.acquireReference()
  2. Android Platform
    SQLiteDatabase.rawQuery
    1. android.database.sqlite.SQLiteClosable.acquireReference(SQLiteClosable.java:55)
    2. android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1312)
    3. android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1255)
    3 frames
  3. mjt.shopwise
    MainActivity.onResume
    1. mjt.shopwise.DBCommonMethods.getTableRows(DBCommonMethods.java:106)
    2. mjt.shopwise.DBCommonMethods.getTableRows(DBCommonMethods.java:59)
    3. mjt.shopwise.DBCommonMethods.getTableRowCount(DBCommonMethods.java:29)
    4. mjt.shopwise.DBCommonMethods.getTableRowCount(DBCommonMethods.java:43)
    5. mjt.shopwise.DBShopMethods.getShopCount(DBShopMethods.java:44)
    6. mjt.shopwise.MainActivity.getDBCounts(MainActivity.java:207)
    7. mjt.shopwise.MainActivity.onResume(MainActivity.java:163)
    7 frames
  4. Android Platform
    ActivityThread.main
    1. android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257)
    2. android.app.Activity.performResume(Activity.java:6076)
    3. android.app.ActivityThread.performResumeActivity(ActivityThread.java:2975)
    4. android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3017)
    5. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1347)
    6. android.os.Handler.dispatchMessage(Handler.java:102)
    7. android.os.Looper.loop(Looper.java:135)
    8. android.app.ActivityThread.main(ActivityThread.java:5254)
    8 frames
  5. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:372)
    2 frames
  6. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
    2 frames