android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14): , w

最近在使用Android 的GreenDao对数据库进行查询的操作时遇到了下面的异常:

android.database.sqlite.SQLiteCantOpenDatabaseException: unable to
open database file (code 14): , while compiling: PRAGMA journal_mode

详细异常的细节如下:

2020-05-25 11:04:30.845 26187-26219/com.pax.psp E/SQLiteLog: (14)
cannot open file at line 32460 of [8201f4e1c5] 2020-05-25 11:04:30.845
26187-26219/com.pax.psp E/SQLiteLog: (14) os_unix.c:32460: (24)
open(/data/user/0/com.pax.psp/databases/data.db-journal) - 2020-05-25
11:04:30.845 26187-26219/com.pax.psp E/SQLiteLog: (14) cannot open
file at line 32460 of [8201f4e1c5] 2020-05-25 11:04:30.845
26187-26219/com.pax.psp E/SQLiteLog: (14) os_unix.c:32460: (24)
open(/data/user/0/com.pax.psp/databases/data.db-journal) - 2020-05-25
11:04:30.845 26187-26219/com.pax.psp E/SQLiteLog: (14) unable to open
database file 2020-05-25 11:04:30.899 26187-26219/com.pax.psp
E/SQLiteDatabase: Failed to open database
‘/data/user/0/com.pax.psp/databases/data.db’.
android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14): , while compiling: PRAGMA journal_mode
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native
Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:634)
at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:320)
at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:294)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:215)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:808)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:793)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:696)
at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:738)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:296)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:223)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
at org.greenrobot.greendao.database.DatabaseOpenHelper.getWritableDb(DatabaseOpenHelper.java:59)
at com.pax.data.local.db.helper.DaoManager.getDatabase(DaoManager.java:47)
at com.pax.data.local.db.helper.DaoManager.getDaomaster(DaoManager.java:56)
at com.pax.data.local.db.helper.DaoManager.getDaoSession(DaoManager.java:60)
at com.pax.data.local.db.helper.BaseDaoHelper.getDaoSession(BaseDaoHelper.java:39)
at com.pax.data.local.db.helper.BaseDaoHelper.getDao(BaseDaoHelper.java:43)
at com.pax.data.local.db.helper.BaseDaoHelper.getNoSessionQuery(BaseDaoHelper.java:48)
at com.pax.data.local.db.helper.TransDataDbHelper.findOfflineTransData(TransDataDbHelper.java:95)
at com.pax.pay.service.OfflineSendService.offlineSend(OfflineSendService.java:62)
at com.pax.pay.service.OfflineSendService.access$000(OfflineSendService.java:38)
at com.pax.pay.service.OfflineSendService 1. r u n ( O f f l i n e S e n d S e r v i c e . j a v a : 53 ) a t j a v a . u t i l . c o n c u r r e n t . E x e c u t o r s 1.run(OfflineSendService.java:53) at java.util.concurrent.Executors 1.run(OfflineSendService.java:53)atjava.util.concurrent.ExecutorsRunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:278)
at java.util.concurrent.ScheduledThreadPoolExecutor S c h e d u l e d F u t u r e T a s k . r u n ( S c h e d u l e d T h

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值