My Oracle Support Banner

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 AUGUST 30, 2023

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 .:<DIR>/ojdbc6-11.2.0.2.1.jar <PROGRAM NAME>
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 .:<DIR>/ojdbc6-11.2.0.4.2.jar <PROGRAM NAME>
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 <TABLE NAME>  (<COLUMN NAME1> number, <COLUMN NAME2> DATE default sysdate);
insert into <TABLE NAME> values (1, sysdate);
commit;
3. Run java program that calls getString() methoid
4. Do the same with JDBC 11.2.0.4.


Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.