Couldn't read row 0, col 0 from CursorWindow. Make sure the Cursor is initialized correctly before

java.lang.IllegalStateException: Couldn't read row 0, col 0 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
        at android.database.CursorWindow.nativeGetLong(Native Method)
        at android.database.CursorWindow.getLong(CursorWindow.java:511)
        at android.database.AbstractWindowedCursor.getLong(AbstractWindowedCursor.java:78)
        at org.greenrobot.greendao.AbstractDao.loadCurrent(AbstractDao.java:541)
        at org.greenrobot.greendao.AbstractDao.loadUnique(AbstractDao.java:172)
        at org.greenrobot.greendao.AbstractDao.loadUniqueAndCloseCursor(AbstractDao.java:159)
        at org.greenrobot.greendao.InternalQueryDaoAccess.loadUniqueAndCloseCursor(InternalQueryDaoAccess.java:41)
        at org.greenrobot.greendao.query.Query.unique(Query.java:130)
        at com.hj.test.service.TestService.uploadAccessLog(TestService.java:36)
        at com.hj.test.service.TestService.onHandleIntent(TestService.java:31)
        at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.os.HandlerThread.run(HandlerThread.java:61)

有的网友说是字段匹配不上等问题,排查后发现是有一个字段内容超长导致;解决办法,使用更大的字段类型或者修改业务逻辑

仅此记录

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值