tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Casteen <robert.cast...@testadvantage.com>
Subject Firebird|Tomcat "java.sql.SQLException: Cannot load JDBC driver class 'null'"
Date Fri, 23 May 2003 22:53:13 GMT
Hey guys, I am hoping I could get some help with this issue. The 
research I have done online reveals this error with several databases 
although I have yet to find a actionable answer nor anything firebird 
spoecific. I am attempting to connect Firebird to Tomcat based on the 
MYSQL example in the Tomcat Docs and through the datasource setup in the 
administration console. I have attempted to include all relevant data to 
show the activity on my server,  including the log, the example code, 
and the relevant server.xml code.

I appreciate all help that you can offer.
Rob

**************Log

java.sql.SQLException: Cannot load JDBC driver class 'null'
    at 
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
    at 
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
    at foo.DBTest.init(DBTest.java:23)
    at org.apache.jsp.test_jsp._jspService(test_jsp.java:49)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
    at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
    at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
    at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
    at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
    at java.lang.Thread.run(Thread.java:536)



***************Server.xml additions:
    <ResourceParams name="TestDB">
      <parameter>
        <name>validationQuery</name>
        <value></value>
      </parameter>
      <parameter>
        <name>maxWait</name>
        <value>5000</value>
      </parameter>
      <parameter>
        <name>maxActive</name>
        <value>4</value>
      </parameter>
      <parameter>
        <name>password</name>
        <value>masterkey</value>
      </parameter>
      <parameter>
        <name>url</name>
        
<value>jdbc:firebirdsql:localhost/3050:C:\\Firebird\\DBcontain\\JAVATEST.FDB</value>
      </parameter>
      <parameter>
        <name>driverClassName</name>
        <value>org.firebirdsql.jdbc.FBDriver</value>
      </parameter>
      <parameter>
        <name>maxIdle</name>
        <value>2</value>
      </parameter>
      <parameter>
        <name>username</name>
        <value>sysdba</value>
      </parameter>
    </ResourceParams>
  </GlobalNamingResources>
**********************code
*******web-inf
<?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
  <description>Firebird Test App</description>
  <resource-ref>
      <description>DB Connection</description>
      <res-ref-name>jdbc/TestDB</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
  </resource-ref>
</web-app>
*******jsp
<html>
  <head>
    <title>DB Test</title>
  </head>
  <body>

  <%
    foo.DBTest tst = new foo.DBTest();
    tst.init();
  %>

  <h2>Results</h2>
    Foo <%= tst.getFoo() %><br/>
    Bar <%= tst.getBar() %>

  </body>
</html>
*********************\\\
I have included the dbtest class in the db_test\WEB-INF\classes\foo 
directory





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message