Hi there,
In using the Oracle plug-in, I'm getting a regular 'class not found' for oracle.jdbc.OracleConnection. The issue is there is a check in the OraclePlugin.java to load that class to use reflection to do a set Time zone. So the current code from line 489 onwards looks like
Class oraConClass = Class.forName("oracle.jdbc.OracleConnection");
Method setSessionTimeZoneMethod = oraConClass.getMethod("setSessionTimeZone", String.class);
if (setSessionTimeZoneMethod != null)
{
setSessionTimeZoneMethod.invoke(con, timezoneStr);
} else
{
s_log.error("setTimezoneForSession: setSessionTimeZoneMethod returned by reflection was null. "
+ "Skipped setting session timezone");
}
The issue is if the jdbc driver is loaded through the extra classpath, then Class.forName doesn't find it.
Wouldn't this be better....
if (con.getClass().getName().equals("oracle.jdbc.OracleConnection")) {
Method setSessionTimeZoneMethod = con.getClass().getMethod("setSessionTimeZone", String.class); if (setSessionTimeZoneMethod != null)
{
setSessionTimeZoneMethod.invoke(con, timezoneStr);
} else
{
s_log.error("setTimezoneForSession: setSessionTimeZoneMethod returned by reflection was null. "
+ "Skipped setting session timezone");
}
}
Suggestions ?
Neville
_________________________________________________________________
Do you have a story that started on Hotmail? Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/
|