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的更多相关文章

  1. '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 ...

  2. 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,默认为 ...

  3. 错误: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;刚开始 ...

  4. 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 ...

  5. 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 ...

  6. 报错 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 ...

  7. 解决 SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp的问题

    连接数据库时 设置:zeroDateTimeBehavior=convertToNull

  8. 报错: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时,如果数据库中有 ...

  9. 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 页面中,时间字段类型为空的信息显示不出来,且报错信息如下: ...

随机推荐

  1. eslint 代码检测工具

    jshint 检测工具不够灵活下,道格拉斯(何许人也?json创造者,javascript重要任务,犀牛那本书就是他写的). 文档地址: 中文地址 English 安装 利用npm全局安装eslint ...

  2. ZedBoard上运行linux系统的准备工作框架

    目标:ZedBoard上运行linux系统. 需要什么:图中上色部分. 应该做哪些工作:上色部分之前的所有步骤. 由上图得知,为了顺利在zedboard上构建嵌入式Linux操作系统,我们一般需要如下 ...

  3. 20170719 Mysql 配置远端Mysql访问,增加表/存储过程

    -- 1 .在windows 环境中安装Mysql 会按照到默认的C盘当中,如何修改呢--? -- 2. 如何只安装客户端不安装Mysql 数据库服务  --? -- 3. 表的特殊列,默认采用函数值 ...

  4. NYOJ 61 传纸条(一)

    双线DP #include<iostream> #include<algorithm> #include<ctype.h> #include<string&g ...

  5. 安全易用的云许可-VirboxLM许可管理平台

    Virbox LM是深思推出的基于云许可管理的开放平台,旨在为开发者提供低成本.高强度.操作便捷的一站式软件保护方案. Virbox LM包括用户许可管理工具.加壳工具.API帮助工具.开发商管理工具 ...

  6. 比Xshel更好用的 FinalShell

    FinalShell功能特点: 1.多平台支持Windows,Mac OS X,Linux 2.多标签,批量服务器管理. 3.支持登录Ssh和Windows远程桌面. 4.漂亮的平滑字体显示,内置10 ...

  7. SQL IN查询优化

    实际项目中有如下SQL, 发现效率很低,用时超过1分钟 select TaskID, StartDate = min(UpdateTime), EndDate = max(UpdateTime) fr ...

  8. openshift 配置ldap认证

    master主配置文件: ...... identityProviders: - challenge: true login: true mappingMethod: claim name: Ldap ...

  9. 【LeetCode每天一题】3Sum Closest(最接近的三数和)

    Given an array nums of n integers and an integer target, find three integers in nums such that the s ...

  10. 2019.03.23 Cookie

    Cookie  曲奇饼干  哈哈哈.通俗的将,应该是发票. 因为http是无状态操作 当你访问服务器之后,应该会给你响应发票Cookie记录你访问了什么东西 便于下次再来查找吧,Cookie有时间的限 ...