It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes Connection Pooling in tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connection Pooling in tomcat" Watch "Connection Pooling in tomcat" New topic

Connection Pooling in tomcat

Vi Mani

Joined: Feb 10, 2011
Posts: 13
Hi ,

I am trying to set up connection pooling to my project.I am stuck with the below mentioned exception .I have put the required entries in server.xml and web.xml and the mysql driver jar and commons-collections-3.2.jar are placed in tomcat lib.Is there any other jar i need to put in the lib and classpath?
Please help.

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(
at com.learn.jqg.JqController.doPost(
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.Http11Protocol$Http11ConnectionHandler.process(
at Source)
Caused by: java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(Unknown Source)
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
... 16 more
Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
The problem is not that there's a class missing somewhere, but that you haven't set a connection URL to your Connection.

J2EE Architect/Developer
I agree. Here's the link:
subject: Connection Pooling in tomcat
It's not a secret anymore!