异常:

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异常相关推荐

  1. java sqlexception_java.sql.SQLException

    java.sql.SQLException: ResultSet is closed是什么错误 java.sql.SQLException:ResultSetisclosed是什么错误 java.sq ...

  2. Java连接数据库出现java.sql.SQLException: After end of result set的原因

    源码 jb4.addActionListener(new ActionListener() {// 新增按钮事件监听器public void actionPerformed(ActionEvent e ...

  3. java.sql.SQLException: Before start of result set ---错误笔记

    错误提示:java.sql.SQLException: Before start of result set  解决方法:使用rs.getString();前一定要加上rs.next(); 原因:Re ...

  4. 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 ...

  5. java.sql.SQLException: Before start of result set

    解决方法:使用rs.getString();前一定要加上rs.next(); 原因:ResultSet对象代表SQL语句执行的结果集,维护指向其当前数据行的光标.每调用一次next()方法,光标向下移 ...

  6. JDBC:java.sql.SQLException: Before start of result set怎么办

    这是由于Statement执行了之后,得到ResultSet,直接rs.getString,而没有运行.next()的关系 运行一下.next()即可 Connection conn = Driver ...

  7. 开发中遇到的Cause: java.sql.SQLException: connection holder is null的异常

    异常的出现是属于获取连接超时,从而找不到持有者. 项目中的配置体现: <property name="removeAbandoned" value="true&qu ...

  8. 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 ...

  9. 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. ...

最新文章

  1. 行为模式之State模式
  2. 初次了解node.js
  3. codeforces 521div3(D Cutting Out)java
  4. mysql通配符查询 性能_使用mysql5.7新特性解决前通配符查询性能问题
  5. Ubuntu下面对Chrome浏览器护眼插件的调研
  6. 小波分析实验: 实验1 连续小波变换
  7. leetcode 173. 二叉搜索树迭代器
  8. VS2013 int main(int argc, char** argv)参数传递
  9. 在外面旅游,手机用电怎么解决?
  10. 用c语言实现数据结构算法将两个有序链表并为一个有序链表的算法,,(完整版)数据结构-习题集答案-(C语言版严蔚敏)...
  11. DelphiIE插件开发
  12. ps随机排列_[PS]圆点随机不重叠排列脚本
  13. c语言中的16进制坐标计算器,16进制计算器
  14. js return加分号_js分号的重要性
  15. 自然语言处理NLP星空智能对话机器人系列:深入理解Transformer自然语言处理 Semantic Role Labeling (SRL).
  16. 批量删除微博(转载)
  17. html 调用es2015模块,给大家分别介绍一下CommonJS和ES2015的import
  18. FastDfs分布式文件存储系统
  19. 学习笔记(十八):MoRe-Fi用深度学习网络从非线性信号中恢复呼吸波形
  20. evolution邮箱_b2evolution简介

热门文章

  1. 【kafka】我用kafka两年踩过的一些非比寻常的坑
  2. 【Elasticsearch】Named Entity Annotations in Elasticsearch es 实体 注解
  3. 【Elasticsearch】es一个奇怪的问题 is_write_index fasle的时候还在写入 索引滚动无效
  4. 【Jvm】jvm -XX 参数 VM 调优参数
  5. 【Kafka】Kafka WARN Failed to send SSL Close message
  6. 【Spark】扩展Spark Catalyst,打造自定义的Spark SQL引擎
  7. 01-maven build项目
  8. 01-windows下git远程拉取项目
  9. Java多线程学习二十一:ConcurrentHashMap 在 Java7 和 8 有何不同
  10. Java lang3的 StringUtils.isNumeric(str)不能识别负数和小数