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类型即可
随机推荐
- children 和childNodes 的区别
1:childNodes /children相同点:它返回指定元素的子元素集合. 2:区别:children : 它是非标准的,仅返回HTML节点.甚至不返回文本节点.所有浏览器表现一 致. chi ...
- Log4j配置文件内容详解
.Log4j的优点 Log4j是Apache的一个开放源代码项目,通过使用Log4j,我们可以控制日志信息输送地:我们也可以控制每一条日志的输出格式:通过定义每一条日志信息的级别,我们能够更加细致地控 ...
- Hbuilder开发移动App(1)
奇妙的前端,奇妙的js 众所周知,自从js有nodejs后,前端人员可以华丽的转身,去开发高并发非阻塞的服务端程序, 随着html5的出现,伴随一些amazing的特性,h5开发app的技术越发的成熟 ...
- 在jquery中each循环中,要用return false代替break,return true代替continue。
在jquery中each循环中,要用return false代替break,return true代替continue. $.each(data, function (n, value) { if(v ...
- IT软件开发中常用的英语词汇
Aabstract 抽象的abstract base class (ABC)抽象基类abstract class 抽象类abstraction 抽象.抽象物.抽象性access 存取.访问access ...
- Logback Pattern
Logback日志配置示例 <appender name="SYSLOG" class="ch.qos.logback.classic.net.SyslogAppe ...
- Java中的集合与线程的Demo
一.简单线程同步问题 package com.ietree.multithread.sync; import java.util.Vector; public class Tickets { publ ...
- 导出Mysql数据库中的数据
使用mysqldump 指令: D:\>mysqldump -u root -proot bookStore>bookStore.sql
- linux操作系统中对大小端的判断
static union { char c[4]; unsigned long l; } endian_test = { { 'l', '?', '?', 'b' } }; #define ENDIA ...
- 封装类(Merry May Day to all you who are burried in work ~)---2017-05-01
1.为什么要使用封装类? (1) 可以多个地方调用,避免代码的冗余 (2)面向对象三大特点之一,安全性高 2.代码及注意点? <?php class DB //文件名为:DB.class.php ...