MySQL allows you to store '0000-00-00' as a “dummy date”.
When trying to view data that includes dates with this value using the SQL editor the following error occurs:
"Error code 0, SQL state S1009: Value '0000-00-00' can not be represented as java.sql.Date"
It's a known problem in MySQL, need to set a special parameter in MySQL driver - http://bugs.mysql.com/bug.php?id=13261.
With this parameter is works better.
Please, use zeroDateTimeBehavior=convertToNull while connecting to your databse. E.g.:
*** Issue 157309 has been marked as a duplicate of this issue. ***
*** Issue 175226 has been marked as a duplicate of this issue. ***
Omg, thanks a lot. very obscured reason:-( I tried to update Connector/J on version 5.1.11 because on
http://bugs.mysql.com/bug.php?id=13261 is info the patch is commited (from july 2008) but still not repaired:( Thanks
for help especialy jskrivanek. Very good support. My first report here and I hope no last. NetBeans is fine tool:)
*** Bug 193562 has been marked as a duplicate of this bug. ***
The zeroDateTimeBehavior=convertToNull solution should be documented somewhere or be supplied as a connection / service-property option?
The current template for mysql jdbc urls leads to this:
The mentioned parameter is now part of the default url. No need to add something by hand. FYI this was checked against a build of core-main from a few days ago.
The problem is that it throwed an exception. Shouldn't it be handled more gracefully?