• 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

using oracle thin diver, tomcat 5.5.9

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1211
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Mac IntelliJ IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic