Quick fix for “java.sql.SQLException: Value ‘0000-00-00′ can not be represented as java.sql.Timestamp”
Friday, February 27th, 2009If you ever run across this while fighting with Hibernate, one quick fix is to instruct JDBC to turn the bad date values into NULLs, eg:
jdbc:mysql://localhost/test?zeroDateTimeBehavior=convertToNull&autoReconnect=true&characterEncoding=UTF-8&characterSetResults=UTF-8
Your mileage side-effects may vary.
More excellent Java + J2EE tips (and lots of other stuff in Czech) here.
