tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Drnek" <>
Subject RE: Tomcat 5 and oracle
Date Wed, 10 Dec 2003 15:59:24 GMT
I'm not sure how that got removed, but I put it back in and it did not

I can do the following:

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn =

So I assume that I have the right oracle drivers etc, I just don't have
JNDI or dbcp setup right.

Thanks for the suggestion

-----Original Message-----
From: Knight, Digby [] 
Sent: Wednesday, December 10, 2003 10:10 AM
Subject: RE: Tomcat 5 and oracle

You may need the following in your server.xml ResourceParams:

It's described in more detail in:
-----Original Message-----
From: Jonathan Drnek []
Sent: 10 December 2003 14:37
Subject: Tomcat 5 and oracle

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
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 ''
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
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

The information in this email and in any attachments is 
confidential and intended solely for the attention and use 
of the named addressee(s). This information may be 
subject to legal professional or other privilege or may 
otherwise be protected by work product immunity or other 
legal rules.  It must not be disclosed to any person without 
our authority.

If you are not the intended recipient, or a person 
responsible for delivering it to the intended recipient, you 
are not authorised to and must not disclose, copy, 
distribute, or retain this message or any part of it.

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

View raw message