搞Value '0000-00-00' can not be represented as java.sql.Date

[20:40.376] cms - could not read column value from result set: birthTime301_; Value '0000-00-00' can not be represented as java.sql.Date
[20:40.377] cms - SQL Error: 0, SQLState: S1009
[20:40.377] cms - Value '0000-00-00' can not be represented as java.sql.Date
[09:20:40.382] javax.servlet.ServletException: javax.servlet.ServletException:

终于找到了 这个问题的原因

Value '0000-00-00' can not be represented as java.sql.Date
数据库里的时间类型不能为以上形式

空的时候 设置成null 就没问题了

你可能感兴趣的:(java,sql,cms,mysql,servlet)