You have the datasource defined globally.  You will need to add a resource
link to your context that you wish to use it.  The contexts cannot see it by
default.

Example:

<Context ...>
        <ResourceLink global="jdbc/myoracle" name="jdbc/myoracle"
type="javax.sql.DataSource"/>
</Context>

-----Original Message-----
From: Thanigaivel_Murugan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 04, 2006 4:07 AM
To: users@tomcat.apache.org
Subject: Datasource configuration for Oracle 9i in Tomcat 5.5

Hi,



I do not know how to configure datasource in Tomcat 5.5 for Oracle 9i. I
tried like this...



1. Server.xml configuration:



<!-- Global JNDI resources -->

  <GlobalNamingResources>



    <!-- Test entry for demonstration purposes -->

    <Environment name="simpleValue" type="java.lang.Integer"
value="30"/>



            <Resource name="jdbc/myoracle" auth="Container"

              type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"


url="jdbc:oracle:thin:@TESTSERVER:1521:TESTDB"

              username="scott" password="tiger" maxActive="20"
maxIdle="10"

              maxWait="-1"/>



  </GlobalNamingResources>



2. Test.jsp



            Context initContext = new InitialContext();

            Context envContext  =
(Context)initContext.lookup("java:/comp/env");

            DataSource ds =
(DataSource)envContext.lookup("jdbc/myoracle");

Connection conn = ds.getConnection();



Output:



javax.servlet.ServletException: Cannot create JDBC driver of class ''
for connect URL 'null'



Can anyone knows the solution?



- Regards

  Thanigai





DISCLAIMER:
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard is
appreciated.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to