You may find that there are multiple occurences of various classes and
interfaces in your classpath e.g. javax.sql, these cause a
ClassCastException to be thrown when trying to narrow a jndi context.

Tony

----- Original Message -----
From: "Maier Holger, ITS-AKIS" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Monday, July 15, 2002 7:06 AM
Subject: AW: DataSource Casting Problem


Hi,
I am also struggling with ConnectionPool
at the moment. I have an Informix DB to connect to.

> It works if I use this:
> org.apache.commons.dbcp.BasicDataSource ds=
>          (org.apache.commons.dbcp.BasicDataSource)
> envCtx.lookup("jdbc/ospreyDb");
>
> Any ideas? Thanks a lot in advance!
How is your configuration of the DS in your server.xml?
Did you define a factory for your DataSource,
i.e.
<parameter>
  <name>factory</name>
  <value>com.informix.jdbcx.IfxDataSourceFactory</value>
</parameter>

for DBCP the value is probably
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>

Then you can probaly do without defining
> org.apache.commons.dbcp.BasicDataSource ds
and using DataSource ds instead.

Hope that helps,
Cheers
Holger

-----------------------------------------------------
Holger Maier      Tel.:  (06831) 47-3497
ITS-AKIS          eMail: [EMAIL PROTECTED]

AG der Dillinger H�ttenwerke
Postfach 1580
66748 Dillingen


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to