1、问题场景描述:后台方法中执行查询返回list列表中,执行后台产生运行时异常 java.sql.SQLException:

2、问题排查和解决:排查代码,无编译时错误,断点调试,更具控制台找到对应的报错地方:

断点调试发现,就是数据库交互时返回值接收时候发生异常:

代码没有问题,排查数据库,因为是时间戳的错误:

找相关时间的字段,发现存在单个对象的属性值其对应的数据库字段类型为date或者datetime类型但是值为0的情况,如0000-00-00:

将相关字段改为正常的时间点值,再次执行,问题解决。

Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp的更多相关文章

  1. '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp error

    '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp error 异常现象 ### Cause: java.sql.SQ ...

  2. mysql解决Value ‘0000-00-00 00:00:00’ can not be represented as java.sql.Timestamp

    同步发布:http://www.yuanrengu.com/index.php/mysqlsolvetimestamp.html 在使用mysql时,如果数据库中的字段类型是timestamp,默认为 ...

  3. 错误:Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp;的解决

    问题: 代码中查询MySQL的结果集时报错,提示Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp;刚开始 ...

  4. java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp

    下面是我查询数据库时打印出来的异常信息: ### Error querying database.  Cause: java.sql.SQLException: Value '0000-00-00 0 ...

  5. Caused by: java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp

    错误信息如下: Caused by: java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java ...

  6. 报错 java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp 原因

    sql异常 java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestam ...

  7. 解决 SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp的问题

    连接数据库时 设置:zeroDateTimeBehavior=convertToNull

  8. 报错:java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp

    感谢原文作者:风起云淡- 原文链接:https://blog.csdn.net/shenguan777/article/details/78615521 异常分析: 在使用MySql时,如果数据库中有 ...

  9. java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Date

    架构使用jsp+servlet+java+mysql mysql里time字段类型为datetime java实体类中该字段类型为Date 页面中,时间字段类型为空的信息显示不出来,且报错信息如下: ...

随机推荐

  1. php获取数据库结构

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  2. 1_02 Vue Slot

    slot 插槽 插槽内容 const component ={ template: ` <div> <slot></slot> </div> ` } n ...

  3. 【雅思】【写作】【大作文】Discuss both views and give your own opinion

    •Discuss both views and give your own opinion •    • •Agree or disagree •Discuss both views •Report ...

  4. (1.15)mysql锁问题之InnoDB锁

    关键词:innodb锁,mysql锁 概要: 1.事务的隔离级别 2.InnoDB锁争用 3.innodb锁 [3.1]innodb的行锁模式及加锁方法 其实,默认情况下,mysql 的 select ...

  5. 可快速生成增删curd改查功能的插件

    仿造Django中的admin自己实现增删改查.模糊搜索.批量操作.条件筛选.popup功能的插件 1.创建组件 首先创建一个app,这里取名为stark,在settings.py中将其进行注册 IN ...

  6. Windows 7系统下安装和卸载删除IE的方法

    1.首先按下 Windows +R 键打开“运行”的窗口,请输入“appwiz.cpl”. 2.在「程序和功能」窗口上按下左上的「查看已安装的更新」. 3.找到「Windows Internet Ex ...

  7. 【1】vue/cli 3.0 脚手架 及cube-ui 安装

    安装 Vue CLI 需要 Node.js 8.9 或更高版本 (推荐 8.11.0+).你可以使用 nvm 或 nvm-windows在同一台电脑中管理多个 Node 版本. 检查node版本: $ ...

  8. Python第三弹--------文件和异常

    文件读取: pi_digits.txt 3.1415926535 8979323846    2643383279 file_reader.py with open('pi_digits.txt') ...

  9. 最短路径-并查集+Floyd[转载]

    题目描述 N个城市,标号从0到N-1,M条道路,第K条道路(K从0开始)的长度为2^K,求编号为0的城市到其他城市的最短距离 输入描述: 第一行两个正整数N(2<=N<=100)M(M&l ...

  10. iOS 上传自己的库到cocoapod

    最近自己写了个库,传到github上,想让自己的库支持cocoapod,这里我看了很多相关文章.下面我就写下详细步骤以及会遇到的问题. 我们会使用trunk的方式提交到cocoa pod 这是2014 ...