Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6880813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:01:24+00:00 2026-05-27T05:01:24+00:00

My situation is this. I have an OrmLiteBaseActivity where there is my main menu.

  • 0

My situation is this. I have an OrmLiteBaseActivity where there is my main menu. When I press a button I go in “backup mode” and I want to download a backup sqlite db from my website.
The problem is that when I try to upload the file, I get no error but the db is not updated untill I close and reopen the software. I would like the update to be on-the-fly.

I’ve tried on my OrmLiteBaseActivity something like this:

case BACKUP_ID:
    getHelper().close();
    Intent i = new Intent(this, Backup.class);
    this.startActivity(i);
    return true;

The I go to the backup activity, update the file, then I want to go back but I got this error:

11-15 19:27:45.359: ERROR/DatabaseHelper(229): Getting connectionSource called after closed
11-15 19:27:45.359: ERROR/DatabaseHelper(229): java.lang.IllegalStateException
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper.getConnectionSource(OrmLiteSqliteOpenHelper.java:78)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper.getDao(OrmLiteSqliteOpenHelper.java:171)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at info.dierrelabs.h4m.ormliteinterface.DatabaseHelper.getPlayerDao(DatabaseHelper.java:159)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at info.dierrelabs.h4m.team.TeamList.onCreate(TeamList.java:20)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at android.app.ActivityThread.access$2200(ActivityThread.java:119)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at android.os.Looper.loop(Looper.java:123)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at android.app.ActivityThread.main(ActivityThread.java:4363)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at java.lang.reflect.Method.invokeNative(Native Method)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at java.lang.reflect.Method.invoke(Method.java:521)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
11-15 19:27:45.359: ERROR/DatabaseHelper(229):     at dalvik.system.NativeStart.main(Native Method)

Is there something I’m missing? I assumed that using an OrmLiteBaseActivity would reopen the db everytime I open a new OrmLiteBaseActivity. Am I doing something wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:01:29+00:00Added an answer on May 27, 2026 at 5:01 am

    So I solved it. When the user presses the backup button, here’s what’s happening:

    case BACKUP_ID:
        getHelper().close();
        Intent i = new Intent(this, Backup.class);
        this.startActivity(i);
        return true;
    

    then I need to reopen this connection. You can actually do it like this (after I swapped sqlite files):

                DatabaseHelper db = new DatabaseHelper(Backup.this);
                db.getWritableDatabase();
    

    The class Backup just extends Activity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this situation: i have to build a menu with datasource from the
I have this situation that when AbstractMethod method is invoked from ImplementClass I want
I was wondering if I have this situation: In our SQLite databse, there are
I have this situation of redirecting my asp page from a button within an
I have this situation where on my main page, there are different fields and
i have this situation. I am using a simple tab menu from here .
I have this situation where I want to display a list of Administration objects
I have this situation: There are a login page with a login form (form
I have this situation where I need to get some data from a webpage
I have this situation where i want to call a certain element depended on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.