Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: do I need an oracle 9 client when using tomcat with jdbc drivers

Re: do I need an oracle 9 client when using tomcat with jdbc drivers

From: Joe Weinstein <joeNOSPAM_at_bea.com>
Date: Tue, 04 Nov 2003 07:54:34 -0800
Message-ID: <3FA7CBBA.8020305@bea.com>

Didier wrote:

> Hi,
>
> We have windows 2000 server running oracle 9.2.0.1.

Hi. You don't need the oracle client to use the thin driver. Can you verify that a simple 10-line Java program can connect to your dbms using the thin driver?

Joe Weinstein at BEA
>
> I've installed a freebsd machine running tomcat 4.1.27 which has the
> following config in server.xml: ------------start
> snip------------------ <Context
> className="org.apache.catalina.core.StandardContext"
>
> cachingAllowed="true"
>
> charsetMapperClass="org.apache.catalina.util.CharsetMapper"
>
> cookies="true" crossContext="false" debug="1"
>
> displayName="Apache-Axis" docBase="our_application"
> mapperClass="org.apache.catalina.core.StandardContextMapper"
>
> path="/our_application" privileged="false" reloadable="false"
> swallowOutput="false" useNaming="true"
>
> wrapperClass="org.apache.catalina.core.StandardWrapper">
>
> <Logger className="org.apache.catalina.logger.FileLogger"
>
> prefix="localhost_our_application_log." suffix=".txt"
>
> timestamp="true"/>
>
> <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:@ourserver:1521:ourdatabase</value>
>
> </parameter>
>
> <parameter>
>
> <name>username</name>
>
> <value>xyz</value>
>
> </parameter>
>
> <parameter>
>
> <name>password</name>
>
> <value>xyz</value>
>
> </parameter>
>
> <parameter>
>
> <name>maxActive</name>
>
> <value>80</value>
>
> </parameter>
>
> <parameter>
>
> <name>maxIdle</name>
>
> <value>40</value>
>
> </parameter>
>
> <parameter>
>
> <name>maxWait</name>
>
> <value>10000</value>
>
> </parameter>
>
> </ResourceParams>
>
> </Context>
>
> --------------end snip -----------------
>
> I've installed the jdk1.4 oracle 9.2.0.1 jdbc drivers in the
> webapplication WEB-INF/lib directory
>
> 1) ojdbc14.jar
>
> 2) ocrs12.zip (which I also copied to ocrs12.jar to be sure both are
> present)
>
> The web.xml of the webapplication has the following lines:
>
> -----------------start snip-----------------
>
> <resource-ref>
>
> <description>mysql connection</description>
>
> <res-ref-name>jdbc/myoracle</res-ref-name>
>
> <res-type>javax.sql.DataSource</res-type>
>
> <res-auth>Container</res-auth>
>
> </resource-ref>
>
> -----------------stop snip--------------------
>
> Here is stdout.log
>
> --------------------start snip----------------
>
> Apache Tomcat/4.1.27
>
> WebappClassLoader:
> validateJarFile(/usr/local/jakarta-tomcat4.1/webapps/ourdatabase/WEB-I
> NF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section
> 9.7.2. Offending class: javax/servlet/Servlet.class NoKey
>
> getDataType=javax.naming.NameNotFoundException: Name NoKey is not
> bound in this Context NoKey
>
> - (null) : javax.naming.NameNotFoundException: Name NoKey is not bound
> in this Context -------------------------stop snip----------------
>
> Unfortunately it doesn't work :-( there are no database connections.
> Do I also need to install an oracle 9i client (I don't hope because
> freebsd doesn't have an available client)
>
> Thanks for any kind of help
>
> Didier
>
>
Received on Tue Nov 04 2003 - 09:54:34 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US