Miillisecond Resolution Missing When Upgrading From JDBC 11.2.0.2 To 11.2.0.4 JDBC Driver

(Doc ID 2331371.1)

Last updated on NOVEMBER 22, 2017

Applies to:

JDBC - Version 11.2.0.4.0 and later
Information in this document applies to any platform.

Symptoms


Miillisecond resolution is added for the Date object's getString() method on a ResultSet object when moving from JDBC 11.2.0.2 to 11.2.0.4 JDBC driver .
To enable TLS on the JDBC connections, the JDBC was upgraded to 11.2.0.4 . After performing the upgrade, some of the timestamps have an additional zero in the "millisecond" field. An example of this issue is:

With 11.2.0.2.x JDBC driver:

$ java -cp .:/home/oracle/ojdbc6-11.2.0.2.1.jar TS3
output as object =2017-09-23 22:14:25.0
output as string =2017-09-23 22:14:25


With 11.2.0.4.x JDBC driver:

$ java -cp .:/home/oracle/ojdbc6-11.2.0.4.2-sfdc.jar TS3
output as object =2017-09-23 22:14:25.0
output as string =2017-09-23 22:14:25.0


Notice that the additional ".0" .


It is expected to get the same results with JDBC 11.2.0.2 and 11.2.0.4.

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Set CLASSPATH to point to JDBC 11.2.0.2.
2. Create table:
create table test_3 (a number, b DATE default sysdate);
insert into test_3 values (1, sysdate);
commit;
3. Run TS3.java
4. Do the same with JDBC 11.2.0.4.


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms