000025117 - ClassCastException when starting eserver with Oracle 10g drivers.

Document created by RSA Customer Support Employee on Jun 16, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000025117
Applies ToClearTrust Authorization Server 5.5.3
Oracle 10g
Oracle 10g Real Application Cluster ( RAC )
IssueClassCastException when starting eserver with Oracle 10g drivers.

Eserver error message in standard output when starting server:

at sirrus.da.sql.util.SQLResultSetConvertor$DateConvertor.convert(SQLResultSetConvertor.java:349)


ClearTrust 5.5.3 has not been certified for use with Oracle 10g.  There were changes made to the way Oracle expresses dates in Oracle 10g that prevent ClearTrust from working correctly.  See the following article:


What is going on with DATE and TIMESTAMP?
This section is on simple data types. :-)

Prior to 9.2, the Oracle JDBC drivers mapped the DATE SQL type to java.sql.Timestamp. This made a certain amount of sense because the Oracle DATE SQL type contains both date and time information as does java.sql.Timestamp. The more obvious mapping to java.sql.Date was somewhat problematic as java.sql.Date does not include time information. It was also the case that the RDBMS did not support the TIMESTAMP SQL type, so there was no problem with mapping DATE to Timestamp.

In 9.2 TIMESTAMP support was added to the RDBMS. The difference between DATE and TIMESTAMP is that TIMESTAMP includes nanoseconds and DATE does not. So, beginning in 9.2, DATE is mapped to Date and TIMESTAMP is mapped to Timestamp. Unfortunately if you were relying on DATE values to contain time information, there is a problem.

There are several ways to address this problem:

Alter your tables to use TIMESTAMP instead of DATE. This is probably rarely possible, but it is the best solution when it is.

Alter your application to use defineColumnType to define the columns as TIMESTAMP rather than DATE. There are problems with this because you really don't want to use defineColumnType unless you have to (see What is defineColumnType and when should I use it?).

Alter you application to use getTimestamp rather than getObject. This is a good solution when possible, however many applications contain generic code that relies on getObject, so it isn't always possible.

Set the V8Compatible connection property. This tells the JDBC drivers to use the old mapping rather than the new one. You can set this flag either as a connection property or a system property. You set the connection property by adding it to the java.util.Properties object passed to DriverManager.getConnection or to OracleDataSource.setConnectionProperties. You set the system property by including a -D option in your java command line. 

  java -Doracle.jdbc.V8Compatible="true" MyApp


ResolutionOnly Oracle 9i is supported for use with ClearTrust 5.5.3

Start java with the following command line.  Note that this option has not been tested by RSA and Oracle 10i is not an officially supported platform for ClearTrust 5.5.3.  Please use this option only under the recommendation of RSA Support.

java -Doracle.jdbc.V8Compatible="true"

WorkaroundCustomer upgraded the Oracle jdbc driver from the 9i to the 10g driver to allow ClearTrust to communicate with Oracle 10g.
Legacy Article IDa35434