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

65 views
Skip to first unread message

aquila....@gmail.com

unread,
Dec 23, 2014, 12:51:05 PM12/23/14
to db...@googlegroups.com
Hi all,

I am  recently get familiar with  dbfit with its new release. I am  currently using mysql database and  got stuck  In running inspect query on dbfit when  the date column may have a date with '0000-00-00' 


As per my understanding  of mysql 
Illegal DATEDATETIME, or TIMESTAMP values are converted to the zero value of the appropriate type ('0000-00-00' or '0000-00-00 00:00:00').

So In that case when  i run inspect query then i got exception. Please let me know if any one having any solution. please see the attachment for Exception message.


Thanks 
Harshit
exception.JPG

Yavor Nikolov

unread,
Dec 23, 2014, 1:05:49 PM12/23/14
to db...@googlegroups.com
How does your test look like?

--
You received this message because you are subscribed to the Google Groups "dbfit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+un...@googlegroups.com.
To post to this group, send email to db...@googlegroups.com.
Visit this group at http://groups.google.com/group/dbfit.
For more options, visit https://groups.google.com/d/optout.

Yavor Nikolov

unread,
Dec 23, 2014, 1:10:44 PM12/23/14
to db...@googlegroups.com
I.e. add zeroDateTimeBehavior=convertToNull parameter to your database connection URL.

Regards,
Yavor
Reply all
Reply to author
Forward
0 new messages