tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Dunn" <rob...@insfin.com>
Subject getConnection() returning a NULL JDBC driver
Date Mon, 02 Sep 2002 01:37:40 GMT
Hi all,

I am attempting to get a connection to the JDBC entry from the server.xml
file and keep getting the error "Cannot load JDBC driver class 'null'". The
error occurs when I attempt to call "ds.getConnection();". I have placed all
of the Interbase JAR files in the Common\Lib directory; Do I need
to register these with Tomcat somehow?

All of the files/system are detailed below. Any ideas would be helpful.

Platform:
        WinXP
        Tomcat 4.1.9 Stand Alone

Java code:
        Context initCtx = new InitialContext();
        Context envCtx = (Context) initCtx.lookup("java:comp/env");
        DataSource ds = (DataSource) envCtx.lookup("jdbc/Transhub");
        Connection conn = ds.getConnection();

The entry in the web.xml file is as follows:
        <resource-ref>
                <description>Interbase JDBC</description>
                <res-ref-name>jdbc/Transhub</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
        </resource-ref>

Entry from the server.xml file is:

  <Resource name="jdbc/Transhub" auth="Container"
type="javax.sql.DataSource"
        description="Resource name for the interbase client connection"/>
  <ResourceParams name="jdbc/Transhub">
    <parameter>
      <name>description</name>
      <value>Resource Parameters for the Transhub Interbase DB</value>
    </parameter>
    <parameter>
      <name>maxActive</name>
      <value>8</value>
    </parameter>
    <parameter>
      <name>maxIdle</name>
      <value>4</value>
    </parameter>
    <parameter>
     <name>user</name>
     <value>sysdba</value>
    </parameter>
    <parameter>
     <name>password</name>
     <value>XXXX</value>
    </parameter>
    <parameter>
       <name>driverClassName</name>
       <value>interbase.interclient.Driver</value>
    </parameter>
    <parameter>
      <name>url</name>
      <value>jdbc:interbase://localhost/C:/Program Files/Common Files/Insfin
Shared/data/iitweb.gdb</value>
    </parameter>
  </ResourceParams>

Thanks in advance, Rob :->


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


Mime
View raw message