You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Robert Dunn <ro...@insfin.com> on 2002/08/28 04:21:23 UTC

Cannot load JDBC driver class 'null'

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 as well - Do I need
to register these with Tomcat somehow? Any ideas/suggestions would be
appreciated.

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>