commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: dataSource.getConnection fails from within tomcat
Date Sun, 15 Dec 2002 00:10:28 GMT


On Sat, 14 Dec 2002, Paul Tomsic wrote:

> Date: Sat, 14 Dec 2002 15:46:24 -0800 (PST)
> From: Paul Tomsic <ptomsic@yahoo.com>
> Reply-To: Jakarta Commons Users List <commons-user@jakarta.apache.org>
> To: Jakarta Commons Users List <commons-user@jakarta.apache.org>
> Cc: craigmcc@apache.org
> Subject: Re: dataSource.getConnection fails from within tomcat
>
> well, the readme for MySQL connector/j 2.0.14
> (formerly mm.mysql - mark matthews)
> describes the usage for this JAR
> as "com.mysql.jdbc.Driver"
> (http://www.mysql.com/downloads/api-jdbc-stable.html)
>
> how should I be doing it?
>
> As for the URL,
> driver.registerPool("dow", connectionPool);
> Connection conn =
> DriverManager.getConnection("jdbc:apache:commons:dbcp:dow");
>
> I thought was the correct way, from:
>
> http://jakarta.apache.org/commons/dbcp/api/index.html
>
> I'm just wondering why it works locally (outside a
> Tomcat env.) but when I integrate it into our tomcat
> env. it fails.
>

Haven't got a clue.  Sounds like you might want to ask on a MySQL list.
All I know is that the Tomcat docs include sample connection URLs for
MySQL that look like

  jdbc:mysql://localhost:3306/javatest?autoReconnect=true

> any thoughts?
>
> thanks again, and sorry if I'm being thick-headed
> here,
>
> Paul

Craig


Mime
View raw message