Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
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的更多相关文章
- '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 ...
- 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,默认为 ...
- 错误: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;刚开始 ...
- 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 ...
- 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 ...
- 报错 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 ...
- 解决 SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp的问题
连接数据库时 设置:zeroDateTimeBehavior=convertToNull
- 报错: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时,如果数据库中有 ...
- 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 页面中,时间字段类型为空的信息显示不出来,且报错信息如下: ...
随机推荐
- nodejs 学习三 异步和同步
同步函数 for (let i = 0; i < 10; i ++) { setTimeout(() => { console.log(`${i} ______ ${new Date}`) ...
- caffe编译报错解决
添加ssd中的一些层之后,编译报错: ../lib/libcaffe.so.1.0.0-rc5:对‘boost::match_results<__gnu_cxx::__normal_iterat ...
- 五、Docker
1.简介 Docker是一个开源的应用容器引擎:是一个轻量级容器技术: Docker支持将软件编译成一个镜像:然后在镜像中各种软件做好配置,将镜像发布出去,其他使用者可以直接使用这个镜像: 运行中的这 ...
- Linux ethtool 命令
ethtool 是用于查询及设置网卡参数的命令,常见用法如下: 注意:该命令只是临时设置,如果网卡重启就失效了,如果想要永久保存应该配置 /etc/sysconfig/network-scripts/ ...
- Navicat工具的使用 2
再双击t1表 进入表 往里面填数据插记录就可以了 tab键往下行 新建一张dep表 部门表 #4. 设计表:外键 新建dep表 员工表新增dep_id 做外键 #5. 新建查询 可以直接在这里查询,不 ...
- 20165236 2017-2018-2《Java程序设计》课程总结
20165236 2017-2018-2<Java程序设计>课程总结 一.每周作业链接汇总: 1.我期望的师生关系 2.学习基础和C语言基础调查 3.20165236郭金涛 预备作业3 L ...
- Elemet-技巧
<el-table-column prop="> </el-table-column> 效果: append-to-body 解决el-dialog 弹窗遮罩为题 & ...
- DataFrame WordCount
测试数据: ** * 使用DataFrame实现WordCount */ object DataFrameWordCount { def main(args: Array[String]): Unit ...
- 【LeetCode每天一题】Generate Parentheses(创造有效的括弧)
Given n pairs of parentheses, write a function to generate all combinations of well-formed parenthes ...
- "pip3 install requests"
后续设置参考 “selenium python3” https://www.cnblogs.com/jpr-ok/p/10108231.html