sqlerror.java 1074_java.sql.SQLException: Before start of result set异常
异常:
java.sql.SQLException: Before start of result set
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.ResultSetImpl.checkRowPos(ResultSetImpl.java:854)
at com.mysql.jdbc.ResultSetImpl.getInt(ResultSetImpl.java:2709)
at com.mysql.jdbc.ResultSetImpl.getInt(ResultSetImpl.java:2850)
at com.mchange.v2.c3p0.impl.NewProxyResultSet.getInt(NewProxyResultSet.java:2426)
at com.synuatp.tester.Tester.saveTeacher(Tester.java:85)
at com.synuatp.tester.Tester.test(Tester.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
异常分析:
在使用ResultSet时,未进行rs.next()指针向下查询,造成该异常。
sqlerror.java 1074_java.sql.SQLException: Before start of result set异常相关推荐
- java sqlexception_java.sql.SQLException
java.sql.SQLException: ResultSet is closed是什么错误 java.sql.SQLException:ResultSetisclosed是什么错误 java.sq ...
- Java连接数据库出现java.sql.SQLException: After end of result set的原因
源码 jb4.addActionListener(new ActionListener() {// 新增按钮事件监听器public void actionPerformed(ActionEvent e ...
- java.sql.SQLException: Before start of result set ---错误笔记
错误提示:java.sql.SQLException: Before start of result set 解决方法:使用rs.getString();前一定要加上rs.next(); 原因:Re ...
- java holder_java.sql.SQLException: connection holder is null
错误信息 2017-11-15 14:53:16.931 [ ] ERROR com.hzcf.flagship.web.AssetPlanController 126 : ### Error upd ...
- java.sql.SQLException: Before start of result set
解决方法:使用rs.getString();前一定要加上rs.next(); 原因:ResultSet对象代表SQL语句执行的结果集,维护指向其当前数据行的光标.每调用一次next()方法,光标向下移 ...
- JDBC:java.sql.SQLException: Before start of result set怎么办
这是由于Statement执行了之后,得到ResultSet,直接rs.getString,而没有运行.next()的关系 运行一下.next()即可 Connection conn = Driver ...
- 开发中遇到的Cause: java.sql.SQLException: connection holder is null的异常
异常的出现是属于获取连接超时,从而找不到持有者. 项目中的配置体现: <property name="removeAbandoned" value="true&qu ...
- JDBC编程可能遇到的错误:java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or ..
文章目录 1.错误提示: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver 2.提示:Loading class com.mysql.jd ...
- HikariPool使用MySQL/MariaDB数据库报错解决:java.sql.SQLException: Access denied for user 'root'@'localhost' (u
在使用HikariPool连接到我的数据库时报错如下,完整的报错放在最后: 2019-06-25 20:24:26.048 ERROR 18204 --- [nio-8080-exec-9] com. ...
最新文章
- 利剑无意之JAVA面试题(三)
- 【机器学习】XGBoost学习笔记
- maven-assembly-plugin插件打包 jar、tar.gz
- I'm genius,用游戏柄控制鼠标
- 点阵字体显示系列之一:ASCII码字库的显示
- 【转】Linux 移动或重命名文件/目录-mv 的10个实用例子
- php 序列化匿名函数,在php中序列化匿名函数
- Bootstrap3的简单入门
- svn上传文件最大多少_SVN控制上传文件尺寸
- 电脑 u盘 正在计算机,优盘插在电脑上一直显示正在扫描优盘怎么回事
- 认清自我,不在迷茫!2019个人年终总结!
- spyder指定python环境
- 1-3年Android开发工程师面试经验分享,面试建议
- 马哥教育42期第一周作业
- 计算机wifi无法打开,苹果Mac电脑WiFi无法打开解决办法
- 2019.5.summary
- 电脑时常断网和掉线的解决方法
- 什么是联想能力?如何提高联想能力?
- Vue的自学之路(三)
- 常用符号计算机输入法,玩电脑必备:一些特殊符号的组合输入法
热门文章
- 95-34-020-Context-ChannelHandlerContext
- 【Elasticsearch】es Timelion是Kibana中时间序列的可视化工具
- 【SpringCloud】服务调用OpenFeign
- 【spark】Spark通过ClickHouse-Native-JDBC写入Clickhouse
- 【MySQL】mysql show操作简单示例
- 【Flink】Flink报错OutofMemoryError : Direct buffer memory
- Cloud Native的设计哲学理念,kubernetes云生态操作系统
- zipkin brave mysql_Zipkin和Brave实现http服务调用的跟踪
- 设计一个安全对外的API接口,需要考虑哪些方面?
- 5种方式,判断一个数组中是否包含某个元素