Handling String date format "0000-00-00 00:00:00" removed in latest version???
I recently tried upgrading to connector/J 3.1.6 - only to find this immediately broke my application wherever I was using zero dates in string format "0000-00-00 00:00:00".
The connector/J changelog states that there are now three ways of handling zero dates, the default now being 'exception', and that other methods of handling can be specified in the server.xml connection url. This enabled me to correct the initial errors with zero dates.
HOWEVER even if I change my server.xml, change all my zero dates to the supposedly valid "0001-01-01 01:01:01" (or "0001-01-01 00:00:00" I tried both) and change all (PreparedStatement) queries to reflect this, the MySql server dies a death as soon as I try to execute a query that references the date field
(select ... where date='0001-01-01 01:01:01').
The error (repeated - for each row in resultset?):
______________________________________
Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Connection reset
STACKTRACE:
java.net.SocketException: Connection reset
______________________________________
The errors occur identically on two installations - one running under Tomcat 5.0 and one Tomcat 5.5.7.
I have reverted to connector/J 3.0.11 for now which works fine, but if anyone knows a way round this, it would help. I'm very surprised indeed that 3.1.6 is not backwards-compatible? - guess I'll be sticking with 3.0.11 unless something changes.
Subject
Written By
Posted
Handling String date format "0000-00-00 00:00:00" removed in latest version???
February 18, 2005 06:59AM
February 18, 2005 08:39AM
February 18, 2005 09:37AM
February 23, 2005 06:58AM
February 23, 2005 08:01AM
February 23, 2005 10:33AM
February 28, 2005 04:02PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.