Sat, 30 May 2009

10:20 PM - Annoying MySQL issue with jdbc

Ever get this?   Cannot convert value '0000-00-00 00:00:00' from column  to TIMESTAMP. 

The problem is that the MySQL jdbc driver doesn't map it to null.  There are flags to the connection that are supposed to do this for you, but I've had no luck getting them to work.  I have two timestamp fields on the User table for this site.  I wrote a MySQL to java data mapper years ago, but now that I'm converting to Cayenne, I can't use that anymore.  Time to fix the database :)

One "solution".  

tags: mysql jdbc errors

0 comments