after update: "SQLiteException: unable to open database file"
<p>why wouldn't there exist a SQLite database after the app was updated to a new version ? How is it possible that the database is no longer present even though it did exist earlier.</p>

<p>(using Android 2.3.3)</p>

<p><strong>Error Log</strong>
why would SQLiteOpenHelper.getWritableDatabase() cause this exception? Surely it would be clever enough to realize "oooh the db doesn't exist, let's create it!</p>

<p>note that the <code>new SQLiteOpenHelper(context)</code> worked OK as far as I can tell. However, I do not know whether <code>onCreate()</code> or <code>onUpgrade()</code> were triggered.</p>

<pre><code>06-04 18:21:01.706 D/AndroidRuntime( 1280): Shutting down VM
06-04 18:21:01.706 W/dalvikvm( 1280): threadid=1: thread exiting with uncaught exception (group=0x40015560)
06-04 18:21:01.745 E/AndroidRuntime( 1280): FATAL EXCEPTION: main
06-04 18:21:01.745 E/AndroidRuntime( 1280): java.lang.ExceptionInInitializerError
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at myapp.com.MyActivity.onCreate(MyActivity.java:131)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.os.Looper.loop(Looper.java:130)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.app.ActivityThread.main(ActivityThread.java:3683)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at java.lang.reflect.Method.invokeNative(Native Method)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at java.lang.reflect.Method.invoke(Method.java:507)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at dalvik.system.NativeStart.main(Native Method)
06-04 18:21:01.745 E/AndroidRuntime( 1280): Caused by: android.database.sqlite.SQLiteException: unable to open database file
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.database.sqlite.SQLiteDatabase.&lt;init&gt;(SQLiteDatabase.java:1849)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:854)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:847)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:547)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:118)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at myapp.com.storage.SQLiteStorage.&lt;init&gt;(SQLiteStorage.java:61)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     at myapp.com.storage.SQLiteStorage.&lt;clinit&gt;(SQLiteStorage.java:58)
06-04 18:21:01.745 E/AndroidRuntime( 1280):     ... 14 more
06-04 18:21:01.776 W/ActivityManager( 1002):   Force finishing activity myapp.com/.MyActivity
</code></pre>

<p>After I trap the exception "SQLiteException: unable to open database file", should the app simply try to instantiate another SQLiteOpenHelper ?</p>
