tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Dunn" <>
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.

        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:
                <description>Interbase JDBC</description>

Entry from the server.xml file is:

  <Resource name="jdbc/Transhub" auth="Container"
        description="Resource name for the interbase client connection"/>
  <ResourceParams name="jdbc/Transhub">
      <value>Resource Parameters for the Transhub Interbase DB</value>
      <value>jdbc:interbase://localhost/C:/Program Files/Common Files/Insfin

Thanks in advance, Rob :->

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message