This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Servlets and the fly likes ClassNotFound OracleDataSource in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "ClassNotFound OracleDataSource in servlet" Watch "ClassNotFound OracleDataSource in servlet" New topic

ClassNotFound OracleDataSource in servlet

Graeme Byers
Ranch Hand

Joined: Apr 16, 2004
Posts: 127
This may be more appropriate for the Java Beginners forum.

My Environment : Win XP Pro , Apache-Tomcat-6.0.18 , Oracle XE 10.2.0 , JDK 1.6

I'm trying to code my first JDBC servlet (DNameModel) - it compiles but when executed :

C:\apache-tomcat-6.0.18\logs\localhost.txt :
java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource
at gbpackage.DNameModel.doGet(


I look inside ojdbc14.jar , using WinRar , and find OracleDataSource.class in
ojdbc14.jar\oracle\jdbc\pool - ZIP archive, unpacked size 3,314,281 bytes

My non-JDBC servlets and batch Oracle JDBC programs which use OracleDataSource execute OK .

Thank you for your help.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63353

At run-time the classpath means nothing. You'll need to add the driver jar to the web app's WEB-INF/lib folder.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: ClassNotFound OracleDataSource in servlet
It's not a secret anymore!