解决:can not be represented as java.sql.Timestamp

### Error querying database. Cause: java.sql.SQLException: Value '1112鎴?wx33鎴?ws34asdf棰?3x00 0sh0000000-00-00 00:00:0002016-05-27 11:47:1600 ' can not be represented as java.sql.Timestamp
### The error may exist in file [E:\Source\20150530_NB\branch\test\target\test\WEB-INF\classes\config\mybatis\hotel\HotelRatePlanInfoMapper.xml]
### The error may involve cn.wxdl.res.test.hotel.persistence.HotelRatePlanInfoMapper.selectByParam-Inline
### The error occurred while setting parameters
### SQL: select id, hotel_id, hotel_name, hotel_en_name, room_id, room_name, room_en_name, rate_plan_id, rate_plan_name, rate_plan_en_name, adult_num, free_child_num, bed_info, manager_id, manager_name, cancel_polity_type, agency_id, user_id, add_time, add_uid, update_time, update_uid, del_flag from hotel_rate_plan_info limit ?,?
### Cause: java.sql.SQLException: Value '1112鎴?wx33鎴?ws34asdf棰?3x00 0sh0000000-00-00 00:00:0002016-05-27 11:47:1600 ' can not be represented as java.sql.Timestamp
; SQL []; Value '1112鎴?wx33鎴?ws34asdf棰?3x00 0sh0000000-00-00 00:00:0002016-05-27 11:47:1600 ' can not be represented as java.sql.Timestamp; nested exception is java.sql.SQLException: Value '1112鎴?wx33鎴?ws34asdf棰?3x00 0sh0000000-00-00 00:00:0002016-05-27 11:47:1600 ' can not be represented as java.sql.Timestamp
原因:mysql的datetime类型支持的范围为'1000-01-01'到'9999-12-31',当你输入不合法的日期或者0自动转为0000-00-00 00:00:00,而这个日期 明显不在我上面提到的范围,所以报错了
解决方法:将表中的时间为'0000-00-00 00:00:00'字段赋值
错误点