Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 61834 invoked from network); 13 Jul 2006 22:03:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jul 2006 22:03:48 -0000 Received: (qmail 37568 invoked by uid 500); 13 Jul 2006 22:03:33 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 37544 invoked by uid 500); 13 Jul 2006 22:03:33 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 37531 invoked by uid 99); 13 Jul 2006 22:03:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 15:03:33 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [207.115.63.98] (HELO pimout4-ext.prodigy.net) (207.115.63.98) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 15:03:32 -0700 X-ORBL: [69.177.90.184] Received: from [127.0.0.1] (69.177.90.184.adsl.snet.net [69.177.90.184] (may be forged)) by pimout4-ext.prodigy.net (8.13.6 out.dk/8.13.6) with ESMTP id k6DM39xb196906 for ; Thu, 13 Jul 2006 18:03:10 -0400 Message-ID: <44B6C318.7000704@yale.edu> Date: Thu, 13 Jul 2006 18:03:04 -0400 From: Mark Shifman User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: JDBC Realm error References: <3A55348B50FD2A40AAA40ABA16C6B6D607F2946E@EXNJMB23.nam.nsroot.net> In-Reply-To: <3A55348B50FD2A40AAA40ABA16C6B6D607F2946E@EXNJMB23.nam.nsroot.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N The oracle driver library that seems to work is ojdbc14.jar http://download.oracle.com/otn/utilities_drivers/jdbc/9205/ojdbc14.jar I just set up a JDBCRealm the other day using it following the realm howto http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html and it worked like a charm. You can also easily create a datasource for your webapp and use it to get connections. http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html mas Propes, Barry L wrote: > precisely it is, as you typed below. > > I'd actually like to toss the JDBC-ODBC bridge software, as I've heard some unstable things about it, maybe this included, but am a little uncertain as to how to truly go about getting the Oracle driver I need. I don't claim to be an expert on Oracle, but I downloaded two zip files - ora9018 and ORA92065.zip. I unzipped these, but neither seems to place a new driver on my machine, nor does it include an exe file that would ostensibly install such. > > I've also downloaded three different OTN zipped files, huge in nature, which I think would install the connectivity client and other components, which I already have on my machine. > > Is there a way to just "cherry pick" to the actual driver? And get it on the box in question? The process doesn't seem to be real intuitive! > > Any feedback is appreciated, though! > > -----Original Message----- > From: David Smith [mailto:dns4@cornell.edu] > Sent: Thursday, July 13, 2006 3:19 PM > To: Tomcat Users List > Subject: Re: JDBC Realm error > > > Is your Realm configured as follows: > > driverName="sun.jdbc.odbc.JdbcOdbcDriver" > connectionURL="jdbc:odbc:DSNName" > connectionName="user_name" > connectionPassword="password" > userTable="chg_users" > userNameCol="user_name" > userCredCol="user_pass" > userRoleTable="chg_users_roles" > roleNameCol="role_name" /> > > You're orignal Realm won't work because you're mixing the Oracle schema > and the JDBC-ODBC bridge connection schema. If you use the JDBC-ODBC > bridge, you have to use a connection string for that driver. You could > (and this is MUCH better in my opinion) toss the JDBC-ODBC bridge > software and just use a true Oracle JDBC driver with a standard Oracle > connection string. > > --David > > Propes, Barry L wrote: > > >> well, Tomcat didn't like that at all! >> >> It tries to come up (the console) and then quickly disappears! >> >> -----Original Message----- >> From: David Smith [mailto:dns4@cornell.edu] >> Sent: Thursday, July 13, 2006 3:00 PM >> To: Tomcat Users List >> Subject: Re: JDBC Realm error >> >> >> Why don't you try using the same dbURL you use in the java code -- >> "jdbc:odbc:DSNName". Also add in the attributes connectionName for the >> auth username to the database and connectionPassword for the auth >> password to same. >> >> --David >> >> Propes, Barry L wrote: >> >> >> >> >>> I'm not sure if this is the method of which to go about posting my problem or issue, but here goes. >>> >>> I've tried configuring my JDBC realm in Tomcat 4.0.1 the last 2 days with no success. Sure, I can mess up the app or get the protection to engage and kick to a login page, but my Oracle configuration doesn't work. >>> >>> For starters, I use the following driver and can connect regularly to do inserts, selects and updates just fine. >>> >>> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); >>> String dbURL = "jdbc:odbc:DSNName"; >>> String usernm = "user_name"; >>> String pwd = "password"; >>> Connection connection = DriverManager.getConnection(dbURL, usernm, pwd); >>> >>> >>> Here are some errors I get when I do the following: >>> Configure the Realm like so: >>> --------- >>> >> driverName="sun.jdbc.odbc.JdbcOdbcDriver" >>> connectionURL="jdbc:odbc:DSNName:@169.xxx.xx.xxx:1521:SID?user=user_name;password=password" >>> userTable="chg_users" userNameCol="user_name" userCredCol="user_pass" >>> userRoleTable="chg_users_roles" roleNameCol="role_name" /> >>> --------- >>> >>> Starting service Tomcat-Standalone >>> Apache Tomcat/4.0.1 >>> Catalina.start: LifecycleException: Exception opening database connection: jav >>> a.sql.SQLException: invalid arguments in call >>> LifecycleException: Exception opening database connection: java.sql.SQLExcepti >>> on: invalid arguments in call >>> at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615) >>> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108) >>> >>> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307 >>> ) >>> at org.apache.catalina.core.StandardService.start(StandardService.java:3 >>> 88) >>> ---------------------------------------------------------------------------------------------------------------------- >>> Then, if I try configuring like the following: >>> ---------------------------------------------- >>> >> driverName="sun.jdbc.odbc.JdbcOdbcDriver" >>> connectionURL="jdbc:odbc:DSNName:@169.xxx.xx.xxx:1521:SID.WORLD" (or just SID w/o WORLD) >>> connectionName="user_name" >>> connectionPassword="password" >>> userTable="chg_users" userNameCol="user_name" userCredCol="user_pass" >>> userRoleTable="chg_users_roles" roleNameCol="role_name" /> >>> ------------------------------------------------- >>> >>> I get this error: >>> --------------------------- >>> >>> Starting service Tomcat-Standalone >>> Apache Tomcat/4.0.1 >>> Catalina.start: LifecycleException: Exception opening database connection: jav >>> a.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too long >>> LifecycleException: Exception opening database connection: java.sql.SQLExcepti >>> on: [Microsoft][ODBC Driver Manager] Data source name too long >>> at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615) >>> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108) >>> >>> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307 >>> ) >>> .... >>> ----- Root Cause ----- >>> java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too lon >>> g >>> >>> --- >>> >>> >>> any help at all would be appreciated and if I went about posing my question in the wrong manner I apologize and will be glad to receive instuctions on the proper protocol >>> >>> Barry Propes >>> CitiFinancial Mortgage - >>> Workflow Enhancements Group >>> 972-657-1128 >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >> --------------------------------------------------------------------- >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> >> --------------------------------------------------------------------- >> To start a new topic, e-mail: users@tomcat.apache.org >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> >> >> > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org