tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Muhammad Khalid Sohail Khan" <>
Subject Connecting to MS Access DB
Date Sun, 01 Aug 2004 14:11:07 GMT
Hi everybody,
I am a student and new to tomcat. I want to use simple database under MS
I have written a simple servlet, which just insert some data into table. But
I am getting following exception
"org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory ([Microsoft][ODBC Driver Manager] Data source name
not found and no default driver specified) "
(just console, main[]) and the connection is successful. I use the exact
same DriverManager Connection strings but it fails when going thru the
Servlet engine in Tomcat.
 Could somebody help me, I am struggling for last many days..
Thanks in advance.
following is the code which I am using to get connection
InitialContext initCtx = new InitialContext();
DataSource ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/Address");
con = ds.getConnection();
Here is my configuration
<Resource name="jdbc/Address" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/Address">

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

View raw message