java.lang.IllegalStateException: Couldn't read row 0, col 2 from CursorWindow.

java.lang.IllegalStateException: Couldn‘t read row 0, col 2 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.

提示说没有找到相应的关键字段,查看数据库的字段是否写对,此时是区分大小写的

java.lang.IllegalStateException: Couldn't read row 0, col 2 from CursorWindow.

时间: 2024-11-06 19:00:27

java.lang.IllegalStateException: Couldn't read row 0, col 2 from CursorWindow.的相关文章

java.lang.IllegalStateException:Couldn't read row 0, col -1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx...}: java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.  要检查列名拼写!列名拼

Couldn't read row 0, col -1 from CursorWindow

java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it. c.getString(c.getColumnIndex("_ID")//字段名称不正确 Couldn't read row 0, col -1 from CursorWin

Xamarin.Android 使用 SQLite 出现 Couldn't read row 0, col -1 from CursorWindow. 异常

异常:Java.Lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it. 出现该问题一般分为两种情况: 1.请求的字段不在表中,可能是大小写没写对.(我就是Id写成id出现的错误) 2.字段类型不匹配. Xamarin.Android 使用 SQLit

数据库Log之Couldn't read row 0, col -1 from CursorWindow

今天写代码,日志报出了一个很奇葩的错误.在CursorWindow的信息是Couldn't read row 0, col -1 这个错误一般是从sqlite查数据的时候照不到指定的列,或数据类型不匹配.避免这些低级错误最好养成良好的编程习惯,比如写成"cursor.getString(cursor.getColumnIndex("xxx"))"而不是"cursor.getString(3)". 再有的一点可能是db = dbHelper.get

Error:Execution failed for task ':app:compileDebugAidl'. > java.lang.IllegalStateException: aidl is missing from '/Users/renguodong/Library/Android/sdk/build-tools/26.0.2/aidl'

错误信息:Error:Execution failed for task ':app:compileDebugAidl'. > java.lang.IllegalStateException: aidl is missing from '/Users/renguodong/Library/Android/sdk/build-tools/26.0.2/aidl' 出错分析:网上查了一些信息,给出的都是要把BuildTools Version和Compile Sdk Version一致.可是我的已经

使用RestTemplate时报错java.lang.IllegalStateException: No instances available for 127.0.0.1

我在RestTemplate的配置类里使用了 @LoadBalanced@Componentpublic class RestTemplateConfig { @Bean @LoadBalanced public RestTemplate restTemplate(){ return new RestTemplate(); }}或者 再调用@Autowiredprivate RestTemplate restTemplate;必须使用应用名作为代替ip:端口,http://127.0.0.1:8

java.lang.IllegalStateException: Failed to load ApplicationContext

1.错误描述 INFO:2015-02-05 22:14:21[main] - Loading XML bean definitions from class path resource [applicationContext.xml] INFO:2015-02-05 22:14:22[main] - JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning INFO:2015-02-05

java.lang.IllegalStateException: No typehandler found for mapping XXX

前言:今天遇到了这个问题,刚开始觉得很容易解决的,毕竟能定位到出问题的文件和对应的字段,根据以往的经验也可以判断出是字段映射类型不匹配的问题,后来找了半天还是没找到问题的根源,从网上百度,也没看到令人满意的分析以及和我情况类似的描述.于是,下定决心,先深呼吸,然后冷静下来好好玩一下. 如下是我的分析过程,这里以提供分析的思路为主,希望以后在遇到类似的问题能一下子定位到,解决掉. 1:异常信息的一部分,如下所示,和以往一样,先仔细瞧瞧,根据异常的提示基本能定位到问题出在那个文件,那个字段或者某个小

java.lang.IllegalStateException

java.lang.IllegalStateExceptionorg.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:423)经过分析.查看jdk文档终于找到解决的办法,在response.sendRedirect()方法后加return语句即可,如下:response.sendRedirect(login.jsp);return null;原因是:在程序中两次调用了response.sendRe