Copy the Oracle JDBC classes file classes12.zip (rename to classes12.jar) into your Tomcat\common\lib directory.
-----Original Message----- From: Peter Shankey [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 8:44 AM To: Tomcat Users List Subject: Loading Oracle Driver Problems Use Tomcat version 5.0.19 with Oracle 9.2.0.4 I have tried to follow the Tomcat instruction but somewhere along the line I have missed something: 1) I have copied all jar files from $ORACLE_HOME/jdbc/lib to $CATALINA_HOME/common/lib 2) Here is the web.xml file: <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> 3) Here is the server.xml file, I put this section between the Host tags in the xml file: <Resource name="jdbc/myoracle" auth="Container" type="javax.sql.DataSource"/> <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:@192.168.1.101:1521:to1</value> </parameter> <parameter> <name>username</name> <value>test</value> </parameter> <parameter> <name>password</name> <value>test</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> 4) Here is the bean I am trying to use: package mybean; import java.beans.*; import java.io.Serializable; import javax.naming.Context; import javax.naming.InitialContext; import javax.sql.DataSource; import java.sql.Connection; import java.sql.*; public class testDBConn extends Object implements Serializable { public testDBConn() throws Exception { Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup("java:/comp/env"); DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle"); Connection conn = ds.getConnection(); } } The error I keep receiving is: MonitorFilter::javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver I am unsure where I am dropping the ball on this issue If you have any ideas please let me know. Thanks Pete --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
