From: Upson, P. <Up...@ma...> - 2005-06-06 17:11:13
|
The latest and greatest problem I'm having is with loading database drivers. I have managed to fix the geomertyless model, but when I call ds = (JDBCDataStore) dsf.createDataStore(params); Function, from my uDig module, I get an IOException. Upon stack traces and working my way down as low as I can I've found the source of the exception is: public ConnectionPoolFacade(String poolKey, String driver) throws SQLException { try { _nativePool = (ConnectionPoolDataSource) (Class.forName(driver) .newInstance()); // LOGGER.fine("Obtained ConnectionPoolDataSource " + _nativePool // + " from driver " + driver); } catch (Exception e) { throw new SQLException( "Failed to instantiate connection pool using " + driver + "(" + e + ")"); } } The driver variable here is "sun.jdbc.odbc.JdbcOdbcDriver" the Exception e is a ClassCastException I've also tried to run my uDig module with the "com.mysql.jdbc.Driver", and "oracle.jdbc.driver.OracleDriver" it seems the Class.forName(driver) works fine, until it is cast to the ConnectionPoolDataStore. Hence the ClassCastException. If anyone knows why this is happening (I have my own suspicions), or (preferably) how to fix the problem, I'd appreciate it Thanks, Patrick Upson |