Hi Frank, With the caveat that I don't use RAC, it looks like you're doing things right from a JDBC/Tomcat perspective, but I thought I'd bring one point just to clarify for you and any lurkers: JDBC doesn't use TNS at all; it only cares about the host, port and SID as specified in the connection string (or xml config).
I'm going to presume that either RAC default or your custom setup is what's dictating your choice of port (as it's not the standard for a regular 1-server oracle connection). Since you seemed to indicate that you have oracle client software actually installed on the box that you're running TC from, might I suggest the OCI driver (instead of thin) which should allow you to make use of the working TNS configuration, and appears to offer support for RAC setups. Here's one quick reference that google turned up; there are probably others that may be more specific to your cause: http://www.praetoriate.com/10g_11_25.htm Good luck, Patrick On 6/20/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > Does anyone have any experience configuring Tomcat to connect to an Oracle > RAC cluster? > > I have an application that currently works in a test environment, where it > connects to a single Oracle server. Now I'm moving it to a QA > environment, where there is a 3-node Oracle cluster using RAC. I'm > getting an Oracle 12505 error (SID not found) trying to talk to the > cluster. Problem is, I'm not sure how the configuration differs in > Tomcat, if it does, in this situation. > > I have a TNS entry in tnsnames, and I can connect to the cluster using > Toad or Oracle Enterprise Manager, so the basic setup appears correct. > > Here's my server.xml context entry: > > <Context path="/app" docBase="app" swallowOutput="false" override="true"> > <Resource name="jdbc/appdb" auth="Container" type="javax.sql.DataSource" /> > <ResourceParams name="jdbc/appdb"> > > <parameter><name>driverClassName</name><value>oracle.jdbc.driver.OracleDriver</value></parameter> > <!-- > <parameter><name>username</name><value>app</value></parameter> > <parameter><name>password</name><value>apptest</value></parameter> > > <parameter><name>url</name><value>jdbc:oracle:thin:@server.company.net:1700:testsid</value></parameter> > --> > <parameter><name>username</name><value>appweb</value></parameter> > <parameter><name>password</name><value>appqa</value></parameter> > > <parameter><name>url</name><value>jdbc:oracle:thin:@node1.company.net:1700:qasid</value></parameter> > <parameter><name>maxActive</name><value>100</value></parameter> > <parameter><name>maxIdle</name><value>75</value></parameter> > <parameter><name>minIdle</name><value>50</value></parameter> > <parameter><name>testOnBorrow></name><value>false</value></parameter> > <parameter><name>logAbandoned</name><value>true</value></parameter> > <parameter><name>removeAbandoned</name><value>true</value></parameter> > <parameter><name>whenExhaustedAction</name><value>1</value></parameter> > </ResourceParams> > </Context> > > Passwords and such have been changed to protect the innocent :) I also > left the commented section for the test environment that *does* work, just > for comparison. > > Now, the first thing that struck me as wrong is that the server I'm > connecting to is only one node in the cluster. Should RAC provide a > single server name that the cluster is accesible through? > > Otherwise, everything looks correct to me. Anyone have any ideas? TIA! > > Frank > > --------------------------------------------------------------------- > 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]
