Thanks for the reply.
there is no .zip file in web-inf folder
i have put (renamed to jar) in common/lib folder.
Pawan
-----Original Message-----
From: graghupathy@aegonuk.co.uk [mailto:graghupathy@aegonuk.co.uk]
Sent: Wednesday, May 14, 2003 2:41 PM
To: tomcat-user@jakarta.apache.org
Subject: RE: Problem in creating connection from connection Pool in
tomcat 4.1.24
rename the .zip to .jar and remove it from WEB-INF
you should be okie
-----Original Message-----
From: pawan [mailto:pawan.s@apar.com]
Sent: 14 May 2003 10:06
To: Tomcat-User (E-mail)
Subject: Problem in creating connection from connection Pool in tomcat
4.1.24
hi,
I am using Oracle database on Win2000 with tomcat 4.1.24
I read how-to-create database connection from connection pool and used it
like that.
I have copied classes111.zip and classes12.zip in common/lib folder...
I have unzipped them, then I removed javax.sql package and I made jar file
again(don't know whether i require it for tomcat 4.1.24 or not??)
my code to access it
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle");
System.out.println("ds11111111 : "+ds);
Connection conn = ds.getConnection();
This is the error i am getting
****************************************************************************
***********
ds11111111 : org.apache.commons.dbcp.BasicDataSource@3e0aba
Error ! 'Cannot load JDBC driver class 'null'
java.sql.SQLException: Cannot load JDBC driver class 'null'
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:529)
****************************************************************************
***********
Please tell me what may be the problem?????
in server.xml i have
<ResourceParams name="jdbc/myoracle">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@172.16.0.100:1521:oracle</value>
</parameter>
<parameter>
<name>username</name>
<value>shyam</value>
</parameter>
<parameter>
<name>password</name>
<value>shyam</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>-1</value>
</parameter>
</ResourceParams>
****************************************************************************
*******
in application web.xml
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/myoracle</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
****************************************************************************
*********
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
|