If you receive an error that is similar to this:
java.sql.SQLException: Value ‚0000-00-00 00:00:00‘ can not be represented as java.sql.Date
Then you should check your database connection. If your connection url looks like jdbc:mysql://localhost/my_database
then you should try jdbc:mysql://localhost/my_database?zeroDateTimeBehavior=convertToNull
.
Other options are:
jdbc:mysql://localhost/my_database?zeroDateTimeBehavior=round
jdbc:mysql://localhost/my_database?zeroDateTimeBehavior=exception
The explanation can be found in „handling DATETIME values„.