File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Products
»
Tomcat
Author
Problem in connection pooling
toukhir mujawar
Ranch Hand
Joined: Oct 11, 2006
Posts: 70
posted
Sep 28, 2007 05:39:00
0
Hi,
I am trying to implement connection pooling.
When I try to connect to the database get the followeing exception.
exception
javax.servlet.ServletException
: Cannot create
JDBC
driver of class '' for connect URL 'null'
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.Welcome_jsp._jspService(org.apache.jsp.Welcome_jsp:163)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
root cause
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
org.apache.jsp.Welcome_jsp._jspService(org.apache.jsp.Welcome_jsp:61)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
The contents of the server.xml file are
<context docBase=dailycollection path=/dailycollection debug="0" reloadable="true">
<Resource name="jdbc/WroxTC5"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc racle:thin:@192.168.1.101:1521:cmsdb"
factory = "org.apache.commons.dbcp.BasicDataSourceFactory"
username="dcol"
password="dcolmsedcl"
maxIdle="2" maxWait="5000"
maxActive="4"/>
</context>
This tag is written in <host> tag.
The contents of web.xml are
<resource-ref>
<res-ref-name>jdbc/WroxTC5</res-ref-name>
<res-type>
javax.sql.DataSource
</res-type>
<res-auth>Form</res-auth>
</resource-ref>
I am using form based authentication. the realm defined for this is
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc racle:thin:@192.168.1.101:1521:cmsdb"
connectionName="dcol" connectionPassword="dcolmsedcl"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name"/>
I have the following jar file in tomcat/common/lib directory
commons-collections-3.1.jar
commons-dbcp-1.2.1.jar
commons-el.jar
commons-pool-1.2.jar
ojdbc14_g.jar
Kindly help me. Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56201
13
I like...
posted
Nov 12, 2007 22:05:00
0
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please
read this
for more information.
[
Smart Questions
] [
JSP FAQ
] [
Books by Bear
] [
Bear's FrontMan
] [
About Bear
]
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Problem in connection pooling
Similar Threads
problem in connection pooling.
problem in connection pooling.
Problem in connection pooling
configure SQL Server 2000 DataSource in Tomcat 5.0.28
Database Lookup problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter