users
[Top] [All Lists]

RE: [cinjug-users] Oracle, Tomcat and Connection Pooling.

To: <users@xxxxxxxxxx>
Subject: RE: [cinjug-users] Oracle, Tomcat and Connection Pooling.
From: "Brian Engel" <Brian.Engel@xxxxxxxxxxxx>
Date: Thu, 18 Aug 2005 14:58:04 -0400
Delivered-to: mailing list users@cinjug.org
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Thread-index: AcWkI9IespJmUKGUT5KFRcdh7/dAlQAAlqDw
Thread-topic: [cinjug-users] Oracle, Tomcat and Connection Pooling.
 
Thanks everyone, James was right it was a classloader issue. I had the oracle jar both in the common/lib and the WEB-INF/lib. I removed the jar from the WEB-INF/lib and the problem went away. Guess the tomcat JNDI connection pool uses the common jar while my application would use the one in the WEB-INF/lib.
 
Not sure what there would be a ClassCastException though, since the jars and classes within them are identical... But I do not know too much of the details of classloaders....
 


From: Eric Bardes [mailto:ericbardes@xxxxxxxxx]
Sent: Thursday, August 18, 2005 2:37 PM
To: Brian Engel
Cc: users@xxxxxxxxxx
Subject: Re: [cinjug-users] Oracle, Tomcat and Connection Pooling.

Tomcat creates a wraps the Oracle class (or any other data source) with it's own class and returns that.  As I understand it, it allows for better pool management.  It know it checks for orphan, idle and invalid connections.

Try changing OracleDataSource to just DataSource.

On 18/08/05, Brian Engel <Brian.Engel@xxxxxxxxxxxx> wrote:
 
Wondering if anyone has encountered this problem, it is driving crazy.
 
 
Basically I trying to setup a connection pool with Tomcat (4.1.30) using Oracle's data source factory (et al).
 
The issue is I am getting a ClassCastException when I attempt to cast the object retrieved via the JNDI lookup.
 
i.e.


--
Cheers,
Eric Bardes
<Prev in Thread] Current Thread [Next in Thread>