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

Resource element in Tomcat 5.5 -- help needed

Blyth Anticay

Joined: Mar 06, 2005
Posts: 2
I am having problems connecting to my database since i upgraded to tomcat 5.5 (from 5.0).
It seems like 5.5 resource factory is configured a bit different with the resource tag. instead of <parameter> elements within <resource> i now specify through attributes to <resource>.
Unfortunately this didnt fix it. I still get the exception:

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 se.peekaboo.db.DatabaseConnector.getConnectionFromConnectionPool(Unknown Source)
at se.peekaboo.db.Database.sqlQuery(Unknown Source)
at org.apache.jsp.checklogin_jsp._jspService(org.apache.jsp.checklogin_jsp:74)
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.jasper.servlet.JspServletWrapper.service(
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
at org.apache.jasper.servlet.JspServlet.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.processConnection(
at org.apache.tomcat.util.threads.ThreadPool$
at Source)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
... 24 more
Christopher Zinn

Joined: Nov 03, 2003
Posts: 13
It looks like your url parameter isn't picking up.
This is a resource tag that I use to connect to an Oracle database.
(It is case sensitive).


I store all my application parameters in a context.xml.

This doesn't sound like your problem, but if you use context.xml files,
in 5.0.x; you would store these in ${TOMCAT_HOME}/webapps.
in 5.5.x; you now place them in ${TOMCAT_HOME}/conf/Catalina/localhost

- Chris
I agree. Here's the link:
subject: Resource element in Tomcat 5.5 -- help needed
jQuery in Action, 3rd edition