Connector/J date problems
Problem:
java.sql.SQLException: Value ‘0000-00-00′ can not be represented as java.sql.Date
Cause:
Zero dates in MySQL are used for error dates - ex. “0000-00-00″. Unfortunately this is by default handled by an exception in the JDBC driver.
Solution:
Add a directive for the driver: zeroDateTimeBehavior=convertToNull
Example:
jdbc:mysql://localhost:3306/tstest?autoReconnect=true&zeroDateTimeBehavior=convertToNull