Defining the Connection Driver ??

Hi there,

i downloaded the new 6.7.0 release to try out the current SQLContainer version, but have a problem with connection.

Here are the concerned lines of code

[color=#145ad2]
JDBCConnectionPool pool = new SimpleJDBCConnectionPool(
,
“org.hsqldb.jdbc.JDBCDriver”

, “jdbc:oracle:thin:@nestor.itm:1521:ITM”
, user , password, 2, 5);

[/color]

/* DriverManager.registerDriver( “org.hsqldb.jdbc.JDBCDriver” );
DBconn = DriverManager.getConnection( “jdbc:oracle:thin:@nestor.itm:1521:ITM” , user, password );
*/

and the runtime error i get

[color=#c90707]
[b]
java.lang.RuntimeException: Specified JDBC Driver: oracle.jdbc.driver.OracleDriver() - initialization failed.

[/b]

[/color]

As you can see in the commented green code; before i was using the java.sql functionalities to handle the connection driver, which worked.

My question is:
How can i determine the correct driver designation to make my connection work ?

Regards,
Gaston

Hi Gaston,

I’m pretty sure that if you’re connecting to an Oracle database, you should use Oracle’s JDBC driver and not HSQLDB’s. E.g. the driver name should be “oracle.jdbc.OracleDriver” instead of “org.hsqldb.jdbc.JDBCDriver”. In a test project I’ve got ojdbc14.jar, which provides the oracle JDBC driver.

HTH,
/Jonatan