nested exception is java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 14 to TIMESTAMP.
无法将“0000-00-00 00:00:00”转换为TIMESTAMP
2017-05-08 00:56:59 [ERROR] - cn.kee.core.dao.impl.GeneralDaoImpl -GeneralDaoImpl.java(100) -GeneralDao getEntity with sql has failed! select * from user_base where userName = ? org.springframework.dao.TransientDataAccessResourceException: PreparedStatementCallback; SQL [ select * from user_base where userName = ? ]; Cannot convert value '0000-00-00 00:00:00' from column 14 to TIMESTAMP.; nested exception is java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 14 to TIMESTAMP.
我会在这里猜测你正在使用MySQL :-)它使用“零日期”作为特殊的占位符 - 不幸的是,JDBC默认情况下无法处理它们。
解决方案是将“zeroDateTimeBehavior = convertToNull”指定为MySQL连接的参数(在数据源URL或附加属性中),例如:
jdbc:mysql://localhost/myDatabase?zeroDateTimeBehavior=convertToNull
这将导致所有这些值被检索为NULL。
nested exception is java.sql.SQLException: Cannot convert value '0000-00-00 00:00:00' from column 14 to TIMESTAMP.的更多相关文章
- nested exception is java.sql.SQLException: Incorrect string value: '\xE7\x99\xBB\xE9\x99\x86...' for column 'image' at row 1
HTTP Status 500 - Hibernate operation: could not insert: [cn.itcast.shop.product.vo.Product]; uncate ...
- nested exception is java.sql.SQLException: IO 错误
1.错误描述 (mx.messaging.messages::ErrorMessage)#0 body = (null) clientId = "18CE3B03-9709-9DA8-763 ...
- Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connectio
严重: StandardWrapper.Throwableorg.springframework.transaction.CannotCreateTransactionException: Could ...
- 2016.11.10 Could not get JDBC Connection; nested exception is java.sql.SQLException: No suitable driver
运行项目rds_web时,出现错误提示:Could not get JDBC Connection; nested exception is java.sql.SQLException: No sui ...
- Could not get JDBC Connection; nested exception is java.sql.SQLException: ${jdbc.driver}
在一个SSM分布式项目中一个服务报错: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnec ...
- 启动Spring boot报错:nested exception is java.sql.SQLException: Field 'id' doesn't have a default value
先看具体日志: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with n ...
- 报错: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. 数据库连接超时
解决方法一: [oracle@data ~]$ sqlplus / as sysdba——连接到数据库 SQL*Plus: Release 11.2.0.4.0 Production on Mon M ...
- ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: An attempt by a client to chec
数据库连接超时,是数据库连接时的相关配置写错,例如:数据库密码,驱动等问题
- hibernate查询oracle数据库表报错SQL state [null]; error code [17027]; 流已被关闭; nested exception is java.sql.SQLException: 流已被关闭
把表字段类型 long 修改为 number类型即可
随机推荐
- C#设计模式之简单工厂模式
简单工厂模式解释: 简单工厂模式(Simple Factory Pattern)属于类的创新型模式,又叫静态工厂方法模式(Static FactoryMethod Pattern) 是通过专门定义一 ...
- 一套常用的css初始化样式
@charset "UTF-8"; /*css 初始化 */ html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, ...
- druid 连接kafuk
java -Xmx256m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Ddruid.realtime.specFile=examples/indexing/ ...
- Linux-配置vim开发环境
vim是一个类似于vi的著名的功能强大.高度可定制的文本编辑器,在vi的基础上改进和增加了很多特性.vim是纯粹的自由软件. 为了满足使用者的要求,将vim界面配置为自己想要的界面类型也变得流行起来. ...
- js继承与闭包(笔记)
1.一切引用类型都是对象,对象时属性的集合:typeof null === 'object'(例外): 2.对象都是通过函数创建来的,比如var obj = new Object();typeof O ...
- .NET的JSON格式数据的三种转换方式
说明: 1..Net进行JSON格式的数据传递的时候,势必用到序列化和反序列化对象,总共有三种方式可是在.NET中实现序列化和反序列化的需求. 2.操作JSON的速度是:Json.net > M ...
- [进程管理] Linux中Load average的理解
Load average的定义 系统平均负载被定义为在特定时间间隔内运行队列中的平均进程树.如果一个进程满足以下条件则其就会位于运行队列中: - 它没有在等待I/O操作的结果 - 它没有主动进入等待状 ...
- ThinkPHP框架之空控制器
HOME代表的是模块 前台可以用Home 后台用Admin Model View Controller 统称为MVC Model 是数据模型 主要是和数据库打交道的 View代表显 ...
- 2017云计算开源峰会 你是想听Linux谈开源还是想听OpenStack谈开源?
2017年,善于把握机遇的企业们不是正在开源,就是走在去开源的路上-- 开源是不是就意味着免费? 开源企业就是要当"活雷锋"? 开源项目究竟如何运作?如何参与开源社区? 如何获得最 ...
- MarkDown本地图片上传工具制作总结
引言:开始尝试使用MarkDown语法写文档,发现图片必须用外链的形式才能插入到文章中,而自己平时最常用的插入图片方式就是QQ截屏,觉得很不方便所以制作的小工具辅助上传,因为时间和水平有限,其实代码写 ...