You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Thanigaivel_Murugan <Th...@Satyam.com> on 2006/04/04 10:06:59 UTC

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.