And oh, did you mean in the auth tag like so?
<auth-constraint> <!-- Users in the service and admin roles can access the admin dir --> <user-name>user_name</user-name> <password>user_password</password> <role-name>service</role-name> <role-name>admin</role-name> </auth-constraint> -----Original Message----- From: David Smith [mailto:[EMAIL PROTECTED] 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: >--------- > <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" > 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: >---------------------------------------------- > <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]