Hi!
I think paraemter driverClassName is missing. Try:
<parameter><name>driverClassName</name><value>oracle.jdbc.OracleDriver</value></parameter>

hope this helps!

thomas

-----Original Message-----
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:36 PM
To: Balzarotti Paolo; Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

<Context path="/inventoryServer" docBase="inventoryServer" debug="5" 
reloadable="false" crossContext="false">
  <Resource name="jdbc/inventoryPool" 
type="oracle.jdbc.pool.OracleConnectionCacheImpl"/>
  <ResourceParams name="jdbc/inventoryPool">
    <parameter>
      <name>factory</name>
      <value>oracle.jdbc.pool.OracleDataSourceFactory</value>
    </parameter>
    <parameter>
      <name>url</name>
      <value>jdbc:oracle:thin:@myNode:1521:myIstance</value>
    </parameter>
    <parameter>
      <name>user</name>
      <value>myUser</value>
    </parameter>
    <parameter>
      <name>password</name>
      <value>myPass</value>
    </parameter>
    <parameter>
      <name>maxLimit</name>
      <value>10</value>
    </parameter>
    <parameter>
      <name>minLimit</name>
      <value>5</value>
    </parameter>
    <parameter>
      <name>cacheScheme</name>
      <value>1</value>
    </parameter>
  </ResourceParams>
</Context>



Any ideas?

~ t r o y ~

-----Original Message-----
From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:11 AM
To: Campano, Troy
Subject: R: Tomcat 4.1, DBCP and Oracle


No,
they suggest to use an oracle.jdbc.pool.OracleConnectionCacheImpl
and an oracle.jdbc.pool.OracleDataSourceFactory
look in chapter 5 
It's an old post, I don't know its validity 8-?

---------------------------------------------


 Oracle JDBC DataSource Example
This example shows how to configure Tomcat to use Oracle's JDBC connection cache data 
source.

First ensure the Oracle JDBC driver is installed correctly. The Oracle drivers can 
typically be located in the $ORACLE_HOME/jdbc/lib directory:

The Oracle JDBC driver must be added to the $CATALINA_HOME/common/lib directory, so 
that it can be loaded as a JNDI Resource. 
Ensure the driver file(s) has a .jar extension, so that it can be automatically loaded 
by Tomcat's class loader. 
Add a Tomcat Resource and ResourceParams element to the web application's Context in 
the $CATALINA_HOME/conf/server.xml file:

<Context ...> ... <Resource name="jdbc/EmployeeDB" 
type="oracle.jdbc.pool.OracleConnectionCacheImpl"/> <ResourceParams 
name="jdbc/EmployeeDB"> <parameter> <name>factory</name> 
<value>oracle.jdbc.pool.OracleDataSourceFactory</value> </parameter> <parameter> 
<name>url</name> <value>jdbc:oracle:thin:@localhost:1521:EmployeeDB</value> 
</parameter> <parameter> <name>user</name> <value>dbusername</value> </parameter> 
<parameter> <name>password</name> <value>dbpassword</value> </parameter> <parameter> 
<name>maxLimit</name> <value>10</value> </parameter> <parameter> <name>minLimit</name> 
<value>5</value> </parameter> <parameter> <name>cacheScheme</name> <value>1</value> 
</parameter> </ResourceParams> ... </Context> 
The configuration properties for Oracle's connection cache data source resource 
factory (oracle.jdbc.pool.OracleDataSourceFactory) are as follows:

cacheScheme - The connection caching scheme: 1 - Dynamic Scheme; creates connections 
as required beyond maxLimit, but will close additional connections beyond maxLimit 
when they become available. 2 - Fixed Return Null Scheme; returns null when no spare 
connections are available. 3 - Fixed Wait Scheme; blocks waiting until a spare 
connection becomes available. database login password. The default value is Dynamic 
Scheme. 
maxLimit - The maximum number of connections in the pool. The default value is 10. 
minLimit - The minimum number of connections in the pool. The default value is 0. 
password - The database login password. 
url - The JDBC connection URL. 
user - The database login username. 
Add a corresponding resource-env-ref element in the web application's web.xml file:

<resource-env-ref> <resource-env-ref-name> jdbc/EmployerDB </resource-env-ref-name> 
<resource-env-ref-type> oracle.jdbc.pool.OracleConnectionCacheImpl 
</resource-env-ref-type> <resource-env-ref> 
Note the OracleConnectionCacheImpl class implements the javax.sql.DataSource 
interface, and should be used like a regular data source.

> -----Messaggio originale-----
> Da: Campano, Troy [mailto:[EMAIL PROTECTED]]
> Inviato: luned́ 9 dicembre 2002 16.08
> A: Balzarotti Paolo
> Oggetto: RE: Tomcat 4.1, DBCP and Oracle
> 
> 
> Is that the same thing as this?
> 
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasourc
> e-examples-howto.html
> 
> 
> -----Original Message-----
> From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 09, 2002 10:02 AM
> To: Campano, Troy
> Subject: R: Tomcat 4.1, DBCP and Oracle
> 
> 
> Hello Troy,
> look at this
> http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg2
> 7217.html
> 
> > -----Messaggio originale-----
> > Da: Campano, Troy [mailto:[EMAIL PROTECTED]]
> > Inviato: luned́ 9 dicembre 2002 15.30
> > A: Balzarotti Paolo
> > Oggetto: RE: Tomcat 4.1, DBCP and Oracle
> > 
> > 
> > Hi Paolo,
> > No, nothing has worked yet...unfortunately.
> > 
> > ~ T r o y ~
> > 
> > -----Original Message-----
> > From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, December 09, 2002 5:56 AM
> > To: Campano, Troy
> > Subject: Tomcat 4.1, DBCP and Oracle
> > 
> > 
> > Hello Troy,
> > have you solved your problem with Tomcat?
> > I've a similar problem: right configuration (I hope!), but when I 
> > launch the test page like the one in the tomcat-docs I see the 
> > system out until
> >  System.out.println("**** init 4.1 " + ds.toString());           
> > reported in the listing and the browser goes in guru meditation
> > ...ahummmmmmmmm...     
> > 
> > public void init() {
> >         try{          
> >             System.out.println("**** init 1");
> >             Context initContext  = new InitialContext();
> >             Context envContext  =
> > (Context)initContext.lookup("java:/comp/env");            
> >             System.out.println("**** init 2");
> >             
> >             if(initContext  == null ){
> >                 System.out.println("**** init 2.1");
> >                 throw new Exception("Boom - No Context");   
>          
> >             }
> >             System.out.println("**** init 3");
> >             DataSource ds =
> > (DataSource)envContext.lookup("jdbc/unifondiDS");          
> >      
> >             System.out.println("**** init 4");
> >             if (ds != null) {
> >                 System.out.println("**** init 4.1");
> >                 System.out.println("**** init 4.1 " +
> ds.getClass());
> >                 System.out.println("**** init 4.1 " +
> ds.toString());
> > 
> >                 Connection conn = ds.getConnection();
> >                 System.out.println("**** init 4.2");
> >                 if(conn != null)  {
> >                     System.out.println("**** init 4.2.1");
> >                     foo = "Got Connection "+conn.toString();
> >                     Statement stmt = conn.createStatement();
> >                     System.out.println("**** init 4.2.2");
> >                     ResultSet rst =
> >                     stmt.executeQuery(
> >                     "select * from anintric where COGNOME  = 
> > 'PIPPO'");
> >                     System.out.println("**** init 4.2.3");
> >                     if(rst.next()) {
> >                         System.out.println("**** init 4.2.3.1");
> >                         foo=rst.getString(2);
> >                         bar=rst.getInt(3);
> >                     }
> >                     System.out.println("**** init 4.2.4");
> >                     conn.close();
> >                 }
> >             }
> >         }catch(Exception e) {
> >             e.printStackTrace();
> >         }
> >     }
> > 
> 

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


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

Reply via email to