• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBCRealm Oracle problem

 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the server.xml file I set up:

<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc racle:thin:@myserevr.xxx.com:1521 RCL"
connectionName="scott"
connectionPassword="tiger"
userTable="TOMCAT_USERS" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="TOMCAT_USER_ROLES" roleNameCol="role_name" />


The problem is that I can connect to that string with userid/password thru my servlets - so the connect info is right. But if I copy this in server.xml and try to set up JDBCRealm to Oracle 9i with setting classpath
(to be safe) in Tomcat 5.0. It does not work. It says can not open database when I connect to my test web page.

What could be wrong? I tested it and works on my PC when I have Oracle/tomcat on the same box.But now on tomcat box I do not have Oracle. I just copied oracle drivers at right location and start tomcat starts fine no error.

Has some one installed Tomcat on one machine and connected to Oracle on another UNIX machine and set up JDBCRealm as mentioned in Tomcat book.

Need help on this one.

Thanks
 
Raj Puri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since i struggled hard on this w/o much help. Here is the problem I had:

1. Oracle drivers were not in lib directory of container.
2. My password had a reserved word "$". That was blowing up JDBCRealm even though another version of application that was unprotected worked fine. As soon as I changed that in server.xml to a vlaue not using this it worked fine.

Overall, I think Tomcat being a freeware is becoming unmanagble for our project as there is not much help and really one needs to spend hours to dig issues like this .... I hate this unproductive Java programming and love old Powerbuilder when we can turn these applications in no time with point and click.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic