'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.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
; SQL []; Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp; nested exception is java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
org.springframework.dao.TransientDataAccessResourceException:
### Error querying database. Cause: java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
最简单的解决办法:
在jdbc的连接中增加:zeroDateTimeBehavior=convertToNull
参考资料:
'0000-00-00 00:00:00' can not be represented as java.sql.Timestamp error的更多相关文章
- 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 ...
- Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
1.问题场景描述:后台方法中执行查询返回list列表中,执行后台产生运行时异常 java.sql.SQLException: 2.问题排查和解决:排查代码,无编译时错误,断点调试,更具控制台找到对应的 ...
- 解决 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 页面中,时间字段类型为空的信息显示不出来,且报错信息如下: ...
随机推荐
- Thinking in Java 笔记
大二就买了这本书,如今再看这本书,看到了一些以前没看的细节,也有了不同的体会.本文使用第4版,整理每章的笔记心得.老外的书有个特点,他会花费大量的文字去阐述一个概念,这比堆代码强多了. 第 1 章 对 ...
- RunLoop-Custom input source
Creating Creating a custom input source involves defining the following: The information you want yo ...
- ADO.NET五大对象理论和实践(草稿)
一.ADO.NET五大对象理论 1. Connection:与数据源建立连接. 2. Command:对数据源执行SQL命令并返回结果. Command对象在执行的的时候有几个比较重要的方法,如Exe ...
- Linux系统检查查看桌面环境
Linux的桌面系统系统多达十几种,像gnome.kde.mate.cinnamon.lxde.xfce.jwm等.比较常用的一般是gnome.kde.xfce等.那么如何判断Linux系统安装了哪种 ...
- MS SQL 错误 :17883,严重度: 1,状态: 0
公司一台老旧的SQL SERVER 2000 数据库,一周内会出现若干次(一次或多次)CPU 持续100%,导致应用程序没有反应的情况,如下图所示: 错误信息如下所示: 日期 2013/7/12 2: ...
- Javascript 中的严格模式
原文:http://www.ruanyifeng.com/blog/2013/01/javascript_strict_mode.html 一.概述 除了正常运行模式,ECMAscript 5添加了第 ...
- linux中的输入从定向和输出重定向
linux的标准的输入和输出为如下 我们在 linux中执行命令时,命令默认输出到console中,很多时候我们需要将命令输出到其他设备上如最常见的就文件中去,或者重文件中输入.那这时候就需要用到li ...
- linux中档案类型
我们用ls-l命令时,在第一列的第一个字符表示是档案类型.如: 那d和-等这些都表示什么呢? [ d ]-------目录 [ - ]--------文件 [ l ]---------连结档(link ...
- 【WPF系列】基础 PasswordBox
参考 How to bind to a PasswordBox in MVVM
- 数据库SQL基本操作
1.查询表结构 desc 表名 2.显示当前连接用户 show user 3.查看系统拥有哪些用户 select * from all_users; 4.查询当前用户下所有对象 select * fr ...