Date fields are the bane of the programmer's existence. Well, at least this morning they were the bane of my existence. I develop and maintain an application for Oracle Application server and it turns out that my local machine uses a different version of the JDBC library than our production and test machines. Nevermind that all Oracle thin clients are called classes12.zip and careless programmers consider them all equal. It pays to know what version the application is using. Here is the call:
java.sql.Connection con = lookupConnection();
logger.info(con.getMetaData().getDriverVersion());
My development environment turns out to be 9.2.0.3.0 and prod/test is 9.0.1.4.0. It turns out that Oracle had a change of heart about Date vs. Timestamp as the default data type for their DATE type in SQL. Read the skinny on OTN.