Home » Developer & Programmer » JDeveloper, Java & XML » Exception on getTimestamp with Oracle JDBC driver (10.1.0.2.0)
Exception on getTimestamp with Oracle JDBC driver (10.1.0.2.0) [message #92666] Thu, 11 November 2004 02:16 Go to next message
Kostya
Messages: 4
Registered: March 2002
Junior Member
Hi all.
1) With old driver (9.0.2.0.0) I have no problem.

2) I am getting the following exception when trying to read some DATE
columns on Oracle(9.2.0.1.0) with JDBC thin driver (10.1.0.2.0)

java.lang.ArrayIndexOutOfBoundsException: -1
at oracle.jdbc.driver.DateTimeCommonAccessor.computeJulianDay(DateTimeCommonAccessor.java:341)
at oracle.jdbc.driver.DateTimeCommonAccessor.getMillis(DateTimeCommonAccessor.java:386)
at oracle.jdbc.driver.DateAccessor.getTimestamp(DateAccessor.java:142)
at oracle.jdbc.driver.OracleResultSetImpl.getTimestamp(OracleResultSetImpl.java:731)
....

Also it being known that exception raised only after 10 rows was
read.
And if I use getString instead of getTimestamp all works fine.

Please, give me a solution or workaround of this problem.
Re: Exception on getTimestamp with Oracle JDBC driver (10.1.0.2.0) [message #157584 is a reply to message #92666] Fri, 03 February 2006 07:53 Go to previous messageGo to next message
berniedurfee
Messages: 3
Registered: February 2006
Junior Member
I am also getting this same exception, related to JIRA data import.

java.lang.ArrayIndexOutOfBoundsException: -1
at oracle.jdbc.driver.DateTimeCommonAccessor.computeJulianDay(DateTimeCommonAccessor.java:341)
at oracle.jdbc.driver.DateTimeCommonAccessor.getMillis(DateTimeCommonAccessor.java:386)
at oracle.jdbc.driver.DateAccessor.getTimestamp(DateAccessor.java:142)
at oracle.jdbc.driver.OracleResultSetImpl.getTimestamp(OracleResultSetImpl.java:1018)

Gotta love Oracle QA!
Re: Exception on getTimestamp with Oracle JDBC driver (10.1.0.2.0) [message #157610 is a reply to message #157584] Fri, 03 February 2006 09:29 Go to previous messageGo to next message
berniedurfee
Messages: 3
Registered: February 2006
Junior Member
I switched from the 10.1.0.4 "thin" driver to the "thick" OCI driver and the import went through fine. This may be a suitable workaround.

1) Download the Instant Client driver.
2) Unzip the libraries and add them to the java.library.path, using -Djava.library.path command line option.
3) Change the JDBC URL from "thin" to "oci"

That will cause the JDBC driver to use the OCI driver libraries to connect to Oracle.
Re: Exception on getTimestamp with Oracle JDBC driver (10.1.0.2.0) [message #157649 is a reply to message #92666] Fri, 03 February 2006 11:23 Go to previous message
berniedurfee
Messages: 3
Registered: February 2006
Junior Member
I dug out the 10.1.0.5 driver from the patch set available to Oracle customers and I can confirm that the 10.1.0.5 JDBC driver works fine.
Previous Topic: deadlock issue in jdbc driver 9.2.0.5
Next Topic: XML Generation using PLSQL
Goto Forum:
  


Current Time: Wed Apr 24 01:38:56 CDT 2024