tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burgess, Jay S" <>
Subject RE: Another Try at MySQL Connection Pooling
Date Wed, 11 Feb 2004 19:09:07 GMT
I forgot whether your original post showed it or not, but how are you
trying to acquire the resource in your code?  It should look something

Context initialContext = new InitialContext();
Context envContext = (Context) initialContext.lookup("java:comp/env");
this.dataSource = (DataSource) envContext.lookup("jdbc/TimesheetsDB ");

Just a thought, in case you've got one of the strings wrong.


-----Original Message-----
From: Merrill Cornish [] 
Sent: Wednesday, February 11, 2004 11:43 AM
To: Tomcat Users List
Subject: Re: Another Try at MySQL Connection Pooling


I THINK I've figure out that MySQL's Connector/J jar worked in
jre/lib/ex when I was using DriverManager because only MySQL needed to
see it, and it knew to look in jre/lib/ex.  However, with DataSource,
I'm assuming it's Tomcat who needs to see it, so it needs to be in
Tomcat's common/lib. 

So I put Connect/J's jar in common/lib--and it still failed in the same

I'm wondering if the actual error message MIGHT be giving a clue.  It
says "Name jdbc is not bound in this Context" when the only thing that
EVER appears in any of the XML is "jdbc/TimesheetsDB". 

  * Does this imply that "jdbc/TimesheetsDB" is wrong and the entries
should be something like simply "TimesheetsDB"?

   * Does this imply that "jdbc" has to be declared in some manner
before "jdbc/TimesheetsDB" can be declared?


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

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

View raw message