File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat Database Connection Pooling Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Database Connection Pooling Error" Watch "Tomcat Database Connection Pooling Error" New topic

Tomcat Database Connection Pooling Error

Sankar Srinivasan

Joined: Sep 23, 2004
Posts: 4
I am trying to create a database connection pool using the Oracle 9i database, but I am getting following error

I am using tomcat version 5.0.19

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver

I have copied the classes12.jar to /common/lib folder of tomcat installation.

Following are my entries config files as follows

in server.xml

<Resource name="jdbc/myoracle" auth="Container" type="javax.sql.DataSource"/>

<ResourceParams name="jdbc/myoracle">
<value>jdbc racle:thin:@</value>

<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>

<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
description="User database that can be updated and saved">
<ResourceParams name="UserDatabase">


Following are entries in my application context xml named as jsp-examples.xml

<context path="/jsp-examples" docBase="/jsp-examples" debug="1">
<ResourceLink global="jdbc/myoracle" name="jdbc/myoracle" type="javax.sql.DataSource" />

I have also included following lines in my WEB-INF/web.xml file

<description>Oracle Datasource example</description>

Could some please help me in solving this problem, I struggling with this issue for more than a week.

Sankar Srinivasan
[ March 17, 2006: Message edited by: Sankar Srinivasan ]
Udayakumar Reddy

Joined: Mar 24, 2006
Posts: 7

There is a simple way of dong the connection pooling in the Tomcat.

Goto http://localhost:8080/admin

Give username and password default are admin&admin

Then Goto TomcatServer->Service->Host->Ur webapplication->DataSources

Then in the right pan select the Create new DataSource from the combo box.
Give the necessary details in the form and click on save button.
And then logout the admin.

The configuration file will be in the $CATALINA_HOME/conf/Cataline/localhost folder with the ur webapplication name.The extension is .xml.

Then restart ur Tomcat server.
Then try to lookup for the JNDI name which is given in the form and u can get the DataSource from that.then enjoy.........

I agree. Here's the link:
subject: Tomcat Database Connection Pooling Error
It's not a secret anymore!