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. Asp.net中"正在中止线程"错误解决方法

    项目中出现“正在中止线程”问题,百度后台发现,都是因为用到Response.End.Response.Redirect 或 Server.Transfer 方法. 原因: Response.End 方 ...

  2. 简述 cookies 和 session 的区别

    1.cookie 和 session 的区别是:cookie数据保存在客户端,session数据保存在服务器端: 2.两个都可以用来存私密的东西,同样也都有有效期的说法,区别在于session是放在服 ...

  3. gitlab小结

    部署Gitlab环境完整记录(我用的是11版本的gitlab,为了后面不出现bug,请选择11) gitlab启用https的配置 gitlab强制修改密码 https://www.cnblogs.c ...

  4. 兼容ie10及以上css3加载进度动画

      html <div class="spinner">   <div class="rect1"></div>   < ...

  5. 如何把Composer镜像迁移到Laravel China 维护的镜像?

    今天在更新Laravel-admin:1.6.0提示没有对应的包,后面才发现需要使用官方或者 Laravel-China 的 composer 镜像,phpcomposer 镜像已经停止维护了.怎么从 ...

  6. 别让Open Sans字体拖慢wordpress后台速度

    最近打开wordpress后台是不是很慢?国内GG登不上了?这两者有没什么直接的联系?没错,WordPress后台是自动加载的谷歌Open Sans字体,据说gg服务器已经迁移到阿嘛丽可,需要一些小手 ...

  7. Python-多线程.md

    # 环境 - xubuntu 16.04 - anaconda - pycharm - python3.6 - https://www.cnblogs.com/jokerbj/p/7460260.ht ...

  8. EOS account 中的 Threshold 和 weight 使用

    https://eoscity.io/f/viewtopic.php?f=7&t=17 这篇文章的原文:   (https://steemit.com/eos/@genereos/eos-mu ...

  9. abap函数返回结构体类型

    1: 定义一个结构体 T-CODE   se11 2: 选择 structure 3:输入相应的字段 4:激活 5:创建一个function module zfm_return_table,返回类型为 ...

  10. VS中去掉空格虚点

    Ctrl + R+W 可以在VS中添加或移除 空格虚点.