aspose file tools*
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
Author

Resource element in Tomcat 5.5 -- help needed

Blyth Anticay
Greenhorn

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(BasicDataSource.java:780)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
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(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
... 24 more
Christopher Zinn
Greenhorn

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).




Also...

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: http://aspose.com/file-tools
 
subject: Resource element in Tomcat 5.5 -- help needed