users@glassfish.java.net

How to configure JDBC-ODBC driver as a JDBC resource?

From: <glassfish_at_javadesktop.org>
Date: Wed, 11 Jul 2007 16:49:51 PDT

I've had success configuring MySQL and SQL Server database connections as JDBC resources via the Glassfish administration console.

I'm now in a situation where I have to use a JDBC-ODBC driver to connect to an Informix database. How do I go about configuring the Connection Pool. Here's where I am at.

1. I created a New Connection Pool in the Glassfish admin console
2. Set the datasource class name to sun.jdbc.odbc.JdbcOdbcDriver
3. Set the resource type to javax.sql.DataSource (and I tried the other options here as well)
4. Added a property called "url" with the value jdbc:odbc:mydsn

When I ping the connection I get a

"sun.jdbc.odbc.JdbcOdbcDriver cannot be cast to javax.sql.DataSource"

error message.

I'd appreciate any help here.

The documentation here http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/bridge.html says that the DataSource is implemented in the JDBC-ODBC bridge. So I'm a little confused.

Thanks in advance for any help.
-sud
[Message sent by forum member 'r_sudh' (r_sudh)]

http://forums.java.net/jive/thread.jspa?messageID=226250