This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using oracle thin diver, tomcat 5.5.9

 
Vikramjit Singh
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Am using oracle 9i and tomcat 5.5.9, plz tell me the steps to use oracle thin driver to access database using DriverManager and DataSource.

thanx
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried following the instructions on http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html?

What problems did you run into?
 
Vikramjit Singh
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I have checked all, am using JDK1.5,tomcat5.5.9,oracle 9.0.1.1 and classes12.jar. somebody tell me is it OK to use this combination like classes12.jar with JDK1.5

cos if i use datasource to access DataBase then i got this error---
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'

thanx...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65339
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"VJS",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vikramjit Singh:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'


Possibly a classpath issue...did you add the driver classes to the Tomcat common/lib directory?

Using classes12.jar with JDK1.5 should not be a problem. Oracle 9.* supports later versions of JDBC though, for that you will need ojdbc14.jar.

HTH.

p.s. Oh..and you should change your display name as Bear instructed, it is a rule most of JavaRanch regulars do care about
 
Jack The Ripper
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if U use ConnectionPool must to implement class
[oracle.jdbc.pool.OracleConnectionPoolDataSource]
and class path to [classes12.jar]
URL : 'jdbc racle:thin:[user/password]@localhost:1521:[sid]'.


Can Help ?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Jack the Ripper",

Please see the second request to change your display name here. This is your third and final warning before your account is deleted. I hope you understand that in the interests of maintaining a professional site your account may deleted before you get a chance to change your display name.

thanks,
Dave
 
Vikramjit Singh
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanx for your messages. but am still getting the error.

My problem is while i use oracle thin driver with JAVA APPLICATION. it works fine. but when i use it with JAVA WEB PROJECT/use it on web page using tomcat 5.5.9 it gives me oracle.jdbc.driver.OracleDriver ClassNotFoundException. Even if i put classes12.zip in classpath and project library. I there any special setting to made for web application using tomcat 5.5.9

help !
 
Vikramjit Singh
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have solved my problem, I was making mistake of not renaming classes12.zip to classes12.jar.

good day
 
Vikramjit Singh
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am using JSP, Tomcat 5.5.9, Oracle 9i through DataSource am getting the records . Its working fine.
My problem is that IS IT MANDATORY TO PUT classes12.jar FILE IN $CATALINA_HOME/COMMON/LIB to use Oracle DataSource. If not what is the other way to get data.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic