1.数据库字段:

`dri_lic_first_time` date DEFAULT NULL COMMENT '驾驶证初次领证日期',

2.异常信息

org.springframework.dao.TransientDataAccessResourceException:
### Error querying database. Cause: java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Timestamp
### The error may exist in com/autoyol/mapper/MemberMapper.xml
### The error may involve com.autoyol.mapper.MemberMapper.getMemBaseInfoByToken
### The error occurred while handling results
### SQL: SELECT reg_no as memNo, nick_name AS nickName, real_name AS realName, first_name AS firstName, gender, mobile, base_dir AS userBasePath, portrait_path AS portrait, res_times AS ownerResTimes, res_total_time AS ownerResTotalTime, res_avg_time AS ownerResAvgTime, buy_times AS rentTimes, buy_total_res_time AS renterResTotalTime, buy_res_avg_time AS renterResAvgTime, email, email_auth AS emailAuth, id_card_auth, id_card_back_auth, dri_lic_auth, day_req_count, day_cancel_req_count, rent_flag, renter_rating as renterRating ,dri_lic_first_time as driLicFirstTime FROM member WHERE token=?
### Cause: java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Timestamp
; SQL []; Value '0000-00-00' can not be represented as java.sql.Timestamp; nested exception is java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Timestamp

3.分析

3.1在客户端修改数据为空,系统会默认加上'0000-00',这样在查询的时候,映射会报错,无法理解这个日期时间

3.2如果要去掉日期数据,需要填写NULL,这样才可以。

3.2直接选择日期或填写日期,2015-01-22

mysql date数据类型异常原因0000-00的更多相关文章

  1. mysql主从同步异常原因及恢复

    mysql主从同步异常原因及恢复 前言 mysql数据库做主从复制,不仅可以为数据库的数据做实时备份,保证数据的完整性,还能做为读写分离,提升数据库的整体性能.但是,mysql主从复制经常会因为某些原 ...

  2. 每日踩坑 2018-12-25 【Unable to convert MySQL date/time value to System.DateTime】异常

    之前的公司一直是用 ORM ,所以底层的事情完全不用在意, 到了这家全是似乎全是 SQL 硬编码 所以也有机会重新去补补以前也没怎么写过的基本 ADO. 不过这两天总有自己写个简易ORM的想法在蠢蠢欲 ...

  3. mysql之数据类型

    一.概述:  所谓建表,就是声明列的过程: 数据是以文件的形式放在硬盘中(也有放在内存里的) 列:不同的列类型占的空间不一样 选列的原则:够用又不浪费: 二.mysql的数据类型: 整形:Tinyin ...

  4. mysql中数据类型的取值范围

    mysql整型bigint.int.mediumint.smallint 和 tinyint的语法介绍,如下: 1.bigint 从 -2^63 (-9223372036854775808) 到 2^ ...

  5. unable to convert MySQL date/time value to System.DateTime

    今天 用C# MySql做项目的时候 遇到了 unable to convert MySQL date/time value to System.DateTime 这样的异常错误,这个原因是因为:表里 ...

  6. mysql各数据类型的存储范围

    文章转自 https://www.cnblogs.com/web21/p/6016120.html mysql整型bigint.int.mediumint.smallint 和 tinyint的语法介 ...

  7. mysql的数据类型和字符集

    MySQL的数据类型 MySQL数据库支持的数据类型主要有以下几种: 整型 浮点型 字符 BLOB型 枚举和集合类型 JSON类型(MySQL5.7新增加的支持) 整型 整数类型是数据库中最基本的数据 ...

  8. MySQL基础数据类型

    一 介绍 存储引擎决定了表的类型,而表内存放的数据也要有不同的类型,每种数据类型都有自己的宽度,但宽度是可选的 详细参考: http://www.runoob.com/mysql/mysql-data ...

  9. Unable to convert MySQL date/time value to System.DateTime 错误

    C#读取MySql时,如果存在字段类型为date/datetime时的可能会出现以下问题“Unable to convert MySQL date/time value to System.DateT ...

随机推荐

  1. 在usercontrol中如何使用验证控件CustomValidator 中的客户端验证

    在用户控件中,为一个文本控件添加CustomValidator验证,然后设置CustomValidator 的ClientValidationFunction 属性为客户端的Validate(sour ...

  2. wpf的datepicker处理

    如果有2个datepicker,控制时间起和止的话,可以把第二个datepicker加一个属性,DisplayDateStart = "{Binding SelectedDate,Eleme ...

  3. EMVTag系列17《9F66 终端交易属性》

    字节:1 8    1 – 支持非接触磁条 (MSD) 0– 不支持非接触磁条 (MSD) 7    1 – 支持非接触PBOC 0– 不支持非接触PBOC 6    1 – 支持非接触qPBOC 0 ...

  4. poj 3641 Pseudoprime numbers

    题目连接 http://poj.org/problem?id=3641 Pseudoprime numbers Description Fermat's theorem states that for ...

  5. poj 1985 Cow Marathon

    题目连接 http://poj.org/problem?id=1985 Cow Marathon Description After hearing about the epidemic of obe ...

  6. poj 1679 The Unique MST

    题目连接 http://poj.org/problem?id=1679 The Unique MST Description Given a connected undirected graph, t ...

  7. UITextField的常用属性,Delegate,重绘

        一  属性 UITextField * myTextField = [[UITextField alloc] initWithFrame:CGRectMake(50, 100, 200, 50 ...

  8. with check option

    通过有with check option选项的视图操作基表(只是面对单表,对连接多表的视图正在寻找答案),有以下结论:首先视图只操作它可以查询出来的数据,对于它查询不出的数据,即使基表有,也不可以通过 ...

  9. java 静态变量生命周期(类生命周期)

    Static: 加载:java虚拟机在加载类的过程中为静态变量分配内存. 类变量:static变量在内存中只有一个,存放在方法区,属于类变量,被所有实例所共享 销毁:类被卸载时,静态变量被销毁,并释放 ...

  10. Linux C 文件与目录3 文件读写

    文件读写 文件读写是指从文件中读出信息或将信息写入到文件中.Linux文件读取可使用read函数来实现的,文件写入可使用write函数来实现.在进行文件写入的操作时,只是在文件的缓冲区中操作,可能没有 ...