Dhiren Bhatia wrote:
I'm using BasicDataSource because javax.sql.DataSource does not have methods
to set the driver class name, url, username/pwd etc. My app needs to support
different databases and the driver is loaded based on which database is
installed.
You've got it backwards. It is the
Hi Dhiren,
Am Montag, 9. Mai 2005 07:36 schrieb Dhiren Bhatia:
Hi all,
I'm getting a the following ClassCastException running Tomcat 5.5.9
with MySQL
java.lang.ClassCastException:
org.apache.tomcat.dbcp.dbcp.BasicDataSource
Here's the relevant code:
*Java code:*
Hi Lutz,
I changed the Resource tag definition to:
Resource name=jdbc/myserver auth=Container type=javax.sql.DataSource
maxActive=100 maxIdle=30 maxWait=1
driverClassName=com.mysql.jdbc.Driver/
I'm setting the username/password and jdbcurl using code.
I still get the same
javax.sql.DataSource?
Gernot
-Ursprüngliche Nachricht-
Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 09. Mai 2005 17:19
An: Tomcat Users List
Betreff: Re: DBCP ClassCastException
Hi Lutz,
I changed the Resource tag definition to:
Resource name=jdbc/myserver auth=Container
Bhatia [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 09. Mai 2005 17:19
An: Tomcat Users List
Betreff: Re: DBCP ClassCastException
Hi Lutz,
I changed the Resource tag definition to:
Resource name=jdbc/myserver auth=Container type=javax.sql.DataSource
maxActive=100 maxIdle=30 maxWait=1
-
Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 09. Mai 2005 17:19
An: Tomcat Users List
Betreff: Re: DBCP ClassCastException
Hi Lutz,
I changed the Resource tag definition to:
Resource name=jdbc/myserver auth=Container type=javax.sql.DataSource
maxActive=100 maxIdle=30
.
Gernot
-Ursprüngliche Nachricht-
Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 09. Mai 2005 18:47
An: Tomcat Users List
Betreff: Re: DBCP ClassCastException
I'm using BasicDataSource because javax.sql.DataSource does not have
methods
to set the driver class name
(or web.xml)
Gernot
-Ursprüngliche Nachricht-
Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 09. Mai 2005 19:27
An: Tomcat Users List
Betreff: Re: DBCP ClassCastException
It works if I use org.apache.tomcat.dbcp.dbcp.BasicDataSource.
I've tried adding all the commons jars
Hi all,
I'm getting a the following ClassCastException running Tomcat 5.5.9 with
MySQL
java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.BasicDataSource
Here's the relevant code:
*Java code:*
org.apache.commons.dbcp.BasicDataSource datasource;
datasource =