3

Does anyone know what this means? I'm trying to start a transaction in onActivityResult() to insert a row based on the received result.

03-05 15:39:51.937: ERROR/Database(2387): Failure 21 (out of memory) on 0x0 when preparing 'BEGIN EXCLUSIVE;'.

03-05 15:39:51.967: DEBUG/AndroidRuntime(2387): Shutting down VM 03-05 15:39:51.967: WARN/dalvikvm(2387): threadid=3: thread exiting with uncaught exception (group=0x40013140)

03-05 15:39:51.967: ERROR/AndroidRuntime(2387): Uncaught handler: thread main exiting due to uncaught exception

03-05 15:39:52.137: ERROR/AndroidRuntime(2387): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { (has extras) }} to activity {com.ozdroid/com.ozdroid.load.LoadView}: android.database.sqlite.SQLiteException: unknown error: BEGIN EXCLUSIVE;

...

03-05 15:39:52.137: ERROR/AndroidRuntime(2387): Caused by: android.database.sqlite.SQLiteException: unknown error: BEGIN EXCLUSIVE;

...

03-05 15:39:52.137: ERROR/AndroidRuntime(2387): at android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:434)

1 Answer 1

9

I've had this happen to me in two situations:

  1. when SQL statements contain syntax errors
  2. when beginTransaction is called on a not-open database connection

It looks like you've run into number two. Check your syntax and make sure you open() (and don't close()) your database before you call beginTransaction.

And I think we can agree that the resulting logcat error messages are not 100% helpful.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.