I had an issue with java and hibernate returning a null date.
java hibernate java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date
This just took a little longer to find the fix on a google search than I thought it should have so I post what I ended up doing to resolve the situation here:
?zeroDateTimeBehavior=convertToNull
you add this to your jdbc connection url and it will convert the 0000-00-00 to the proper type for java to work with.
More info here:
http://dev.mysql.com/doc/mysql/en/cj-upgrading.html#cj-upgrading-3-0-to-3-1
thanks to this thread, which had many other suggestions, but most of them were not helpful, but the one above saved my day.
http://forum.java.sun.com/thread.jspa?threadID=649520&messageID=3824019
you can add this on the end of your hibernate connection file, like so...


Comments (2)
wow, thx this information are elemental for using dataproviders, :) thx again
Posted by Mackzter | August 5, 2008 9:48 AM
Posted on August 5, 2008 09:48
Thanks, you just saved me from dropping Netbeans as my IDE!
Posted by damian wallace | December 23, 2008 1:44 PM
Posted on December 23, 2008 13:44