struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Belingueres <>
Subject Re: MySQL + JDBC
Date Mon, 14 Dec 2009 20:51:25 GMT
What do you mean by "I need to use ODBC to abstract the database connection."??

In most (all?) web containers I know about, there is a standard way of
abstract out the database connection and it is by declaring a
javax.sql.DataSource, which you can get it from JNDI (which is pretty
standard too.)
Declaring the datasource may be app server vendor dependent, but it is
the same mechanism for all database vendors (having a JDBC
drive) just declare the fully qualified driver class name, the
username, the password, the connection URL, and the JNDI name.

Also, going to configure an ODBC driver you get the extra complexity
of installing the right version for the OS...I remember a couple of
headaches trying to configure a 32-bit ODBC driver on a 64-bit win2003


2009/12/14 Todd Grigsby <>:
> Manos Batsis wrote:
>> Todd Grigsby wrote:
>>> Fantastic!  The error that I'm getting is,
>>> "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
>>> PoolableConnectionFactory ([Microsoft][ODBC Driver Manager] The specified
>>> DSN contains an architecture mismatch between the Driver and Application."
>>>  Ever seen that?
>> My guess is you are using a microsoft ODBC to JDBC driver or something?
>> Just use the JDBC drivers for MySQL. You can download those and get docos
>> from MySQL's website.
> I would use the MySQL connector directly, but I need to use ODBC to abstract
> the database connection.  MySQL is not the only database we connect to.  The
> question is, is it possible to go MySQL -> ODBC -> JDBC -> Struts 2?  It was
> possible under Struts 1.1 on WinXP, and we are attempting to migrate to
> Struts 2 (or trying to) on Win7 64-bit.
> TG
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message