0

We have a user that run our app on a Motorola PLUS, and when we try to read from a sqlite db he get the following exception.

We have already tried to delete completely the app and the database and reinstall it.

We also tried to query the database using a simple rawquery, but no success.

Any suggestion is welcome!

java.lang.RuntimeException: An error occured while executing doInBackground()
    at android.support.v4.b.r.done(SourceFile:137)
    at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
    at java.lang.Thread.run(Thread.java:1019)
Caused by: android.database.sqlite.SQLiteException: no such table: records: , while compiling: SELECT _id, name, isbackground FROM records ORDER BY _id ASC
        at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
        at android.database.sqlite.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:92)
        at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:65)
        at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:83)
        at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:49)
        at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:42)
        at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1365)
        at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:330)
        at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:280)
        at com.voicepro.db.RecordsContentProvider.query(SourceFile:289)
        at android.content.ContentProvider$Transport.query(ContentProvider.java:187)
        at android.content.ContentResolver.query(ContentResolver.java:266)
        at android.support.v4.b.f.loadInBackground(SourceFile:49)
        at android.support.v4.b.f.loadInBackground(SourceFile:35)
        at android.support.v4.b.a.onLoadInBackground(SourceFile:240)
        at android.support.v4.b.b.doInBackground(SourceFile:51)
        at android.support.v4.b.b.doInBackground(SourceFile:40)
        at android.support.v4.b.q.call(SourceFile:123)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
        ... 4 more
android.database.sqlite.SQLiteException: no such table: records: , while compiling: SELECT _id, name, isbackground FROM records ORDER BY _id ASC
        at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
        at android.database.sqlite.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:92)
        at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:65)
        at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:83)
        at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:49)
        at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:42)
        at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1365)
        at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:330)
        at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:280)
        at com.voicepro.db.RecordsContentProvider.query(SourceFile:289)
        at android.content.ContentProvider$Transport.query(ContentProvider.java:187)
        at android.content.ContentResolver.query(ContentResolver.java:266)
        at android.support.v4.b.f.loadInBackground(SourceFile:49)
        at android.support.v4.b.f.loadInBackground(SourceFile:35)
        at android.support.v4.b.a.onLoadInBackground(SourceFile:240)
        at android.support.v4.b.b.doInBackground(SourceFile:51)
        at android.support.v4.b.b.doInBackground(SourceFile:40)
        at android.support.v4.b.q.call(SourceFile:123)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
        at java.lang.Thread.run(Thread.java:1019)
Giuseppe
  • 1,079
  • 13
  • 31
  • might be an issue with sqlite version used in motorola's rom – waqaslam Oct 11 '12 at 14:13
  • Is it possible that the device does not have enough space on its internal storage so some tables failed to be created when you create the database? – Joe Oct 11 '12 at 14:22
  • Thank you ! seems that problem is related to the SQLITE version as this post http://stackoverflow.com/questions/2421189/version-of-sqlite-used-in-android and as same problem now we have also on ASUS A10 that have same version of SQLLITE, any suggestion how to proceed with users ? – Giuseppe Oct 11 '12 at 14:30

1 Answers1

1

i had the same problem. my guess is that it doesn't happen on all devices as you said- but the problem is not the sqlite version, the problem is probably because in some place in your code you deleted the table (in my case i deleted the cache for a web client). go over your code and re-exam it.

see: Strange SQLiteException not in all devices

Community
  • 1
  • 1