Tuesday, May 29, 2012

Grails Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp

Problem: 

When using mySQL Hibernate to convert a database value to a Timestamp I get the following error:

Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp

 Solution:

 append the zeroDateTimeBehaviour=convertToNull parameter to end of the URL configuration as follows:

jdbc:mysql://localhost:3306/facs?zeroDateTimeBehavior=convertToNull

References:


No comments:

Post a Comment