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
xt.xml (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
actory and it works in tomcat 5.5with
> the above jars.
>
> 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
gt;
> 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
> -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:
> maxActive=&q
n use 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:
I'm setting the username/pa
Hi Lutz,
I changed the Resource tag definition to:
I'm setting the username/password and jdbcurl using code.
I still get the same ClassCastException. Is Tomcat instantiating the
correct DataSourceFactory?
I have the commons-dbcp-1.2.1.jar in my ${TOMCAT_HOME}/common/lib
Thanks,
Dhiren
On
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:*
> org.apache.c
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 = (BasicDataSource)ctx.lookup(