Closed database; Automatic sync causes "attempt to re-open an already-closed object: SQLiteDatabase" exception

view story

http://stackoverflow.com – I am creating an Android application using GreenDAO ORM, with a genericized crud service layer on top of that. I have this single file that holds static references to my DaoMaster as well as my SQLiteDatabase: public class DATABASE { private static final String TAG = "DATABASE"; private static SQLiteDatabase db; private static DaoMaster.DevOpenHelper helper; private static DaoMaster master; public static void Initialize(Context context){ if(db == null) { Log.d(TAG, "Database = null"); helper = new DaoMaster.DevOpenHelper(context, C (HowTos)