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 7831323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:40:30+00:00 2026-06-02T11:40:30+00:00

I have a file with all my database variables which includes following line: public

  • 0

I have a file with all my database variables which includes following line:

public static final String TABLE_CONFERENCES = "conferences";

My SQLiteOpenHelper creates the database and tests if everything works fine. Afterwards I make sure the tables were created.

db.beginTransaction();
...
db.execSQL(DatabaseConstants.CREATE_TABLE_CONFERENCES);
...
db.endTransaction();

Log.d(TAG, "testing successful create execution");
db.execSQL("SELECT * FROM " + DatabaseConstants.TABLE_CONFERENCES);
Log.d(TAG, "executed create statements successfully");

I’m filling the table with some test data and log the result to make sure no errors occurred.

    values = new ContentValues();

    cal.set(2020, 1, 1, 12, 30, 0);
    values.put(DatabaseConstants.CONFERENCE_START, cal.getTimeInMillis());
    cal.set(2021, 6, 6, 13, 30, 0);
    values.put(DatabaseConstants.CONFERENCE_END, cal.getTimeInMillis());
    values.put(DatabaseConstants.CONFERENCE_CREATOR, lastInsertId);

    conferenceID = lastInsertId = db.insert(DatabaseConstants.TABLE_CONFERENCES, null, values);

    Log.d(TAG, "inserted ConferenceId: " + Long.toString(lastInsertId));

    cursor = db.query(
                DatabaseConstants.TABLE_CONFERENCES,
                new String[] { DatabaseConstants.CONFERENCE_ID },
                DatabaseConstants.CONFERENCE_ID + "=" + lastInsertId, 
                null, 
                null, 
                null, 
                null,
                null);

    Log.d(TAG, "inserted Conference successfully");

    cursor.moveToFirst();

    Log.d(TAG,
            "Conference has " + DatabaseConstants.PARTICIPANT_ID + ": " + 
            Long.toString(cursor.getLong(cursor.getColumnIndex(DatabaseConstants.CONFERENCE_ID))));

    cursor.close();

I coded a Datasource for my conferences which contains following method:

public Conference getConference(long conferenceId) {
    Log.d(TAG, "getConference with conferenceId " + conferenceId + " called");

    /*
     * query(table, columns, selection, selectionArgs, groupBy, having, orderBy)
     */
    Cursor cursor = database.query(
            DatabaseConstants.TABLE_CONFERENCES,
            fields, 
            DatabaseConstants.CONFERENCE_ID + "=" + conferenceId, 
            null, 
            null, 
            null, 
            null);

    cursor.moveToFirst();

    Conference conference = cursorToConference(cursor);

    cursor.close();

    return conference;
}

But if I’m calling the method above. I get the following error:

04-20 14:39:28.669: D/ConferenceDataSource(1300): getConference with conferenceId 1 called
04-20 14:39:28.669: I/SqliteDatabaseCpp(1300): sqlite returned: error code = 1, msg = no such table: conferences, db=/data/data/com.tsystems.openconf/databases/OpenConf_App.Prototype.1.5
04-20 14:39:28.729: D/AndroidRuntime(1300): Shutting down VM
04-20 14:39:28.729: W/dalvikvm(1300): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
04-20 14:39:28.879: E/AndroidRuntime(1300): FATAL EXCEPTION: main
04-20 14:39:28.879: E/AndroidRuntime(1300): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tsystems.openconf/com.tsystems.openconf.dashboard.item.ConferenceTableActivity}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tsystems.openconf/com.tsystems.openconf.tab.ConferenceInfoActivity}: android.database.sqlite.SQLiteException: no such table: conferences: , while compiling: SELECT _id, startTime, endTime, creator FROM conferences WHERE _id=1
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.os.Looper.loop(Looper.java:137)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.ActivityThread.main(ActivityThread.java:4424)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at java.lang.reflect.Method.invokeNative(Native Method)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at java.lang.reflect.Method.invoke(Method.java:511)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at dalvik.system.NativeStart.main(Native Method)
04-20 14:39:28.879: E/AndroidRuntime(1300): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tsystems.openconf/com.tsystems.openconf.tab.ConferenceInfoActivity}: android.database.sqlite.SQLiteException: no such table: conferences: , while compiling: SELECT _id, startTime, endTime, creator FROM conferences WHERE _id=1
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:1797)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:682)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.widget.TabHost.setCurrentTab(TabHost.java:346)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.widget.TabHost.addTab(TabHost.java:236)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at com.tsystems.openconf.dashboard.item.ConferenceTableActivity.onCreate(ConferenceTableActivity.java:55)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.Activity.performCreate(Activity.java:4465)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
04-20 14:39:28.879: E/AndroidRuntime(1300):     ... 11 more
04-20 14:39:28.879: E/AndroidRuntime(1300): Caused by: android.database.sqlite.SQLiteException: no such table: conferences: , while compiling: SELECT _id, startTime, endTime, creator FROM conferences WHERE _id=1
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:68)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:143)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:361)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:127)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:94)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:53)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:47)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1564)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1449)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1405)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1485)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at com.tsystems.openconf.database.dataSource.ConferenceDataSource.getConference(ConferenceDataSource.java:100)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at com.tsystems.openconf.tab.ConferenceInfoActivity.onCreate(ConferenceInfoActivity.java:34)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.Activity.performCreate(Activity.java:4465)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-20 14:39:28.879: E/AndroidRuntime(1300):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
04-20 14:39:28.879: E/AndroidRuntime(1300):     ... 21 more
04-20 14:39:28.988: D/dalvikvm(1300): GC_CONCURRENT freed 215K, 3% free 9321K/9607K, paused 8ms+9ms
04-20 14:39:29.109: E/SQLiteDatabase(1300): close() was never explicitly called on database '/data/data/com.tsystems.openconf/databases/OpenConf_App.Prototype.1.5' 
04-20 14:39:29.109: E/SQLiteDatabase(1300): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1943)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1007)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:986)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1051)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:770)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:221)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:157)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at com.tsystems.openconf.database.dataSource.ConferenceDataSource.open(ConferenceDataSource.java:41)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at com.tsystems.openconf.tab.ConferenceInfoActivity.onCreate(ConferenceInfoActivity.java:32)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.Activity.performCreate(Activity.java:4465)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:1797)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:682)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.widget.TabHost.setCurrentTab(TabHost.java:346)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.widget.TabHost.addTab(TabHost.java:236)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at com.tsystems.openconf.dashboard.item.ConferenceTableActivity.onCreate(ConferenceTableActivity.java:55)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.Activity.performCreate(Activity.java:4465)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.os.Looper.loop(Looper.java:137)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at android.app.ActivityThread.main(ActivityThread.java:4424)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at java.lang.reflect.Method.invokeNative(Native Method)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at java.lang.reflect.Method.invoke(Method.java:511)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-20 14:39:29.109: E/SQLiteDatabase(1300):     at dalvik.system.NativeStart.main(Native Method)
04-20 14:39:29.109: E/System(1300): Uncaught exception thrown by finalizer
04-20 14:39:29.139: E/System(1300): java.lang.IllegalStateException: Don't have database lock!
04-20 14:39:29.139: E/System(1300):     at android.database.sqlite.SQLiteDatabase.verifyLockOwner(SQLiteDatabase.java:2090)
04-20 14:39:29.139: E/System(1300):     at android.database.sqlite.SQLiteDatabase$1.entryRemoved(SQLiteDatabase.java:2182)
04-20 14:39:29.139: E/System(1300):     at android.database.sqlite.SQLiteDatabase$1.entryRemoved(SQLiteDatabase.java:2178)
04-20 14:39:29.139: E/System(1300):     at android.util.LruCache.trimToSize(LruCache.java:197)
04-20 14:39:29.139: E/System(1300):     at android.util.LruCache.evictAll(LruCache.java:285)
04-20 14:39:29.139: E/System(1300):     at android.database.sqlite.SQLiteDatabase.deallocCachedSqlStatements(SQLiteDatabase.java:2143)
04-20 14:39:29.139: E/System(1300):     at android.database.sqlite.SQLiteDatabase.closeClosable(SQLiteDatabase.java:1126)
04-20 14:39:29.139: E/System(1300):     at android.database.sqlite.SQLiteDatabase.finalize(SQLiteDatabase.java:1914)
04-20 14:39:29.139: E/System(1300):     at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:182)
04-20 14:39:29.139: E/System(1300):     at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)
04-20 14:39:29.139: E/System(1300):     at java.lang.Thread.run(Thread.java:856)

Help! Don’t know where to start finding the error.

  • 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-06-02T11:40:31+00:00Added an answer on June 2, 2026 at 11:40 am

    you forgot about db.setTransactionSuccessful(); before db.endTransaction(); after db.execSQL(DatabaseConstants.CREATE_TABLE_CONFERENCES); so table doesn’t exist…

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

Sidebar

Related Questions

I have data in different tables but in the same database, all of which
I have the following code, which retrieves the page slugs from the database which
I usually have a config-file with some global variables for database connectivity settings (such
I have the following file which process a single XML file and pushes it
I have the following line of code in my program which I took from
I have a sql file generated by mysqldump --all-databases . There are many databases
I have a header file with all the enums listed (#ifndef #define #endif construct
I have file locale/es/LC_MESSAGES/django.mo (and .po), ran makemessages and compilemessages. Definitely all messages are
I have an image file that has all the character sprites that I will
i have a file with the points for all the states. i want to

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.