There are problems with Oracle and org.oracle.TIMESTAMP objects
The Oracle 10g JDBC driver treats the SQL TIMESTAMP type in a special way. When calling ResultSet.getObject() it returns an object of type org.oracle.TIMESTAMP. This can cause problems in software, such as OGSA-DAI, which would expect a java.sql.Timestamp, even if getObject() is called. This feature is explained in:
The pages explain that the driver can be told to return a java.sql.Timestamp if a property, oracle.jdbc.J2EE13Compliant, is set to value true. There are a number of ways this can be done. Please see the above pages for the complete list. Two ways are:
- Set a system property by calling the java command with the flag -Doracle.jdbc.J2EE13Compliant=true.
- Pass the property to the driver when a connection is created e.g.
java.util.Properties properties = new java.util.Properties(); properties.put("user", user); properties.put("password", password); properties.put("oracle.jdbc.J2EE13Compliant", "true"); Connection = connection DriverManager.getConnection(url, properties);
As the first approach is difficult to do in OGSA-DAI we have included support for such connection properties to be provided as part of a relational resource configuration file. All configuration properties with a dai.connect. prefix are considered to be properties to be passed to the database, so OGSA-DAI strips the prefix off and sets these on the JDBC connection.
So, you can add the following to their data resource configuration file in the CONFIG-END block: