This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Connection pooling issue in Apache 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection pooling issue in Apache 6.0" Watch "Connection pooling issue in Apache 6.0" New topic

Connection pooling issue in Apache 6.0

ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
This code is working fine without connection pooling but when I am using connection pooling I am facing some problem .Please check the code once I have given comment.

1) Connection pool code in apache server

2) The Error is:

java.lang.ClassCastException: oracle.jdbc.driver.OracleResultSetImpl
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
at org.apache.tomcat.util.threads.ThreadPool$

--------------------Here are the contents for server.xml and context files used in tomcat 6.0

In this I changed :type="javax.sql.DataSource" as



Just for your reference I wrote:
This code is for without connection pool

Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403

I did something like this and it worked for me fine.

Servlet Code

My Web.XML content

----------And my context.xml

I Removed all new entries from server.xml that i made before
And......the ghost went away....

The code is working orsom now.........
jQuery in Action, 2nd edition
subject: Connection pooling issue in Apache 6.0
Similar Threads
insert problem in oracle
DSN name not found error with TOMCAT5.5.7
making connection pool in Glassfish v3
DataSource is Null in JNDI Connection with Tomcat
Tomcat 5.x - Cannot create PoolableConnectionFactory