Related Categories: Web Dev

Coldfusion 8 comes bundled with the mysql commercial jdbc driver 5.0.5 (or it did with my install anyway).  I just ran into a bug that results in this error: java.sql.SQLException: Value '00:00:00 can not be represented as java.sql.Time

The bug is the date / time parsing interprets midnight (00:00:00) as illegal for the TIME type. 

Two ways to fix.

Update to 5.0.6 (I haven't tried this yet, but assume it would be just fine)

OR add "useFastDateParsing=false" to the connection string in the datasource.

I tried the "useFastDateParsing=false" and it worked perfectly.  No restarts of anything.  Not sure how that will affect performance though.  My quick tests show it running pretty quick still.  If I get time I will try with and without and time queries to see.  Ideally I would like to update the driver instead, but its Friday at 5:30 and I am not about to do that right now.

Which gets me thinking, how often would Adobe be updating these drivers?  Will the next updater fix this?  Or should we be doing that manually?


Like this entry? Subscribe to my blog.

Comments (moderation on)

Thanks so much for this post. I had the same problem even though the CF8 upgrade migrated my CF7 "manually created" j connector. Not surprisingly, the "useFastDateParsing=false" didn't work on the old Datasources, but recreating them using the native CF8 MySQL 4/5 datatype with the "useFastDateParsing=false" connection string worked like a champ.
# Posted By Dan | 4/14/08 6:31 PM

Sponsors


Savvy Content Manager