Com.mysql.jdbc.MysqlDataTruncation:Data truncation:incorrect datetime value
Phenomenon: can query normally. But the fields in the Insert DateTime type report the following error:
caused By:com.mysql.jdbc.MysqlDataTruncation:Data truncation:incorrect datetime value: ' For column ' Crttime ' at row 1
At Com.mysql.jdbc.MysqlIO.checkErrorPacket (mysqlio.java:2868)
At Com.mysql.jdbc.MysqlIO.sendCommand (mysqlio.java:1573)
At Com.mysql.jdbc.ServerPreparedStatement.serverExecute (serverpreparedstatement.java:1160)
At Com.mysql.jdbc.ServerPreparedStatement.executeInternal (serverpreparedstatement.java:685)
At Com.mysql.jdbc.PreparedStatement.executeUpdate (preparedstatement.java:1400)
At Com.mysql.jdbc.PreparedStatement.executeUpdate (preparedstatement.java:1314)
At Com.mysql.jdbc.PreparedStatement.executeUpdate (preparedstatement.java:1299)
Workaround: Update the driver from Mysql-connector-java-5.0.3-bin.jar to Mysql-connector-java-5.1.10-bin.jar issue resolution.
Reproduced!!!! (So the jar package is still going to be updated ...) )
Log MySQL time insertion error (Data truncation:incorrect datetime value)