Mysql null date 18 December 2006
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…
blog comments powered by Disqus
Hello, this is where I am publishing my old development blog as well as making new posts in the future. I am not that active with my blogigng these days, but perhaps with a new blog setup I will be slightly more motivated. Currently I am mostly involved with Ruby and mobile development. You can find my code on github.