Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Development

Reply
New Contributor
Posts: 4
Registered: ‎08-21-2013
My Device: Developer
My Carrier: Developer

“SQLiteException: unable to open database file”

We've ported our android application on Blackberry 10. And some users get "The application has stopped unexpectedly" error on launch. Stack trace of the error:

 

Caused by: android.database.sqlite.SQLiteException: unable to open database file
            at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
            at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1849)
            at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:820)
            at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:854)
            at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:847)
            at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:544)
            at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203)
            at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:118)

 On Android devices and Blackberry emulator we've never faced the error. Any help?

 

Retired
Posts: 264
Registered: ‎01-08-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: Bell

Re: “SQLiteException: unable to open database file”

Hey serzhby,

 

1. Which OS version are you currently running?

2. Whereabouts are you creating/reading your database?

 

    Justin

Justin Jasmann | Android Application Development Consultant
Developer Relations
developer.blackberry.com
New Contributor
Posts: 4
Registered: ‎08-21-2013
My Device: Developer
My Carrier: Developer

Re: “SQLiteException: unable to open database file”

This report is received from one of our customers with Blackberry z10.

 

The database is created with SQLiteOpenHelper. There is no multithread access. And on android and BB simulator works fine. The problem occurs only on some devices, and we don't have one, where the problem exists.

 

Maybe somebody met the same problem?

Highlighted
Retired
Posts: 264
Registered: ‎01-08-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: Bell

Re: “SQLiteException: unable to open database file”

serzhby,

 

This may have been a bug that was resolved on a newer OS build.

 

If you can reproduce the issue, you can open a bug here : https://www.blackberry.com/jira/secure/Dashboard.jspa. Attach a sample application that exhibits the same behaviour and we'll have the developers take a look.

 

Thanks,

 

    Justin 

Justin Jasmann | Android Application Development Consultant
Developer Relations
developer.blackberry.com