Re: DBCP ClassCastException

2005-05-10 Thread Nikola Milutinovic
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

AW: DBCP ClassCastException

2005-05-09 Thread Pfingstl Gernot
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

Re: DBCP ClassCastException

2005-05-09 Thread Dhiren Bhatia
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

AW: DBCP ClassCastException

2005-05-09 Thread Pfingstl Gernot
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

Re: DBCP ClassCastException

2005-05-09 Thread Dhiren Bhatia
> -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

AW: DBCP ClassCastException

2005-05-09 Thread Pfingstl Gernot
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

Re: DBCP ClassCastException

2005-05-09 Thread Dhiren Bhatia
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

Re: DBCP ClassCastException

2005-05-08 Thread Lutz Zetzsche
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

DBCP ClassCastException

2005-05-08 Thread 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.commons.dbcp.BasicDataSource datasource; datasource = (BasicDataSource)ctx.lookup(