JAVA Development FAQ and java Development FAQ
When the MySQL table has two field types: TIMESTAMP, the following problems often occur:
Caused by: java. SQL. SQLException: Value '2017-00-00 00:00:00 'can not be represented as java. SQL. Timestamp
At com. mysql. jdbc. SQLError. createSQLException (SQLError. java: 1078)
At com. mysql. jdbc. SQLError. createSQLException (SQLError. java: 989)
At com. mysql. jdbc. SQLError. createSQLException (SQLError. java: 975)
At com. mysql. jdbc. SQLError. createSQLException (SQLError. java: 920)
At com. mysql. jdbc. ResultSetRow. getTimestampFast (ResultSetRow. java: 1102)
Solution: zeroDateTimeBehavior = convertToNull
Similar to: # MySQL
Hibernate. dialect = org. hibernate. dialect. MySQLDialect
ValidationQuery. sqlserver = SELECT 1
Jdbc. url. jeecg = jdbc: mysql: // 127.0.0.1: 3306/jeewx? UseUnicode = true & characterEncoding = UTF-8 & zeroDateTimeBehavior = convertToNull