tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Drnek" <>
Subject Tomcat 5 and oracle
Date Wed, 10 Dec 2003 14:36:52 GMT
I am having a problem setting up a data source in tomcat.  I seem to
remember having this problem last time I played with it several moths
ago but I don't remember what I did to fix it.
I am running Tomcat 5.0.16 with JVM version 1.4.2_03-b02 on windows
I am trying to connect to an Oracle database.
I have placed the ojdbc14.jar file in common\lib
The error I am getting is
javax.servlet.ServletException: Cannot create JDBC driver of class ''
for connect URL 'null', cause: No suitable driver
I am using oracle.jdbc.driver.OracleDriver because that's what the docs
said, but I seem to recall that was not correct.  I just can't find
anything that tells me what other driver I should be using.
My server.xml file has
<Resource name="jdbc/ordt" type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/ordt">
        <value>select * from dual</value>
web.xml looks like
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  <display-name>Metrology Lab</display-name>
     First Source Metrology Lab
 <description>Oracle Datasource example</description>
my code looks like
            Context initContext = new InitialContext();
            Context envContext  =
            DataSource ds = (DataSource)envContext.lookup("jdbc/ordt");
            Connection conn = ds.getConnection();
Thanks for any help,
Jon Drnek

View raw message