?
Solved

where to put the Oracle JDBC driver under Tomcat?

Posted on 2003-03-20
10
Medium Priority
?
260 Views
Last Modified: 2010-04-01
Dear experts,

We have just installed a new server for Tomcat. I have Tomcat running on my PC fine, but we are not sure where to put the Oracle JDBC driver on our server since it is shared by multiple users. Another question is reload does not seem to work all the time even we have it set to true in server.xml, any idea?

Thank.
0
Comment
Question by:changcy77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
10 Comments
 
LVL 14

Accepted Solution

by:
kennethxu earned 80 total points
ID: 8174530
find the classes12.zip file in any of oracle installation. copy it to <tomcat>/common/lib and RENAME it to oraclejdbc12.jar
0
 

Author Comment

by:changcy77
ID: 8174585
Thanks.
But, I have used it without renaming it on my machine. Why do you suggest to rename it?
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8174982
tomcat will automatically put all .jar files under common/lib into it's classpath. it is by tomcat's design that only .jar files are searched, not .zip files. so just rename it to anything.jar will do the purpose.

have you tried it?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:kennethxu
ID: 8175004
about the question of reload, it depends on what you have changed. not all changes can be reloaded. but you can always use tomcat manager to force a complete reload of specified context. so you don't have to restart the server.
0
 
LVL 1

Expert Comment

by:umangjoshi
ID: 8179151
put in web-inf/lib directory
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8181048
>> put in web-inf/lib directory
anything in web-inf/lib is only accessible by one webapp. database driver should be availabe to all webapps deployed to the server as well as tomcat server itself. especially if you intend to use connection pool datasource provided by tomcat.
0
 

Author Comment

by:changcy77
ID: 8181795
thanks.

the truth is after testing, i found web-inf/lib won't work even just for one webapp. i think common/lib will be the answer, but i have to get through other people to test that. the other thing is i am not convinced zip file won't work..it works on stand alone Tomcat.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8182165
>> the other thing is i am not convinced zip file won't work

maybe tomcat fixed this in its newest release. rename the zip is based on experience of mine and quite of others. We do considered this was tomcat's bug, because zip and jar are essentially the some format. I have explained the cause of this bug in my previous post.

To be in save part, I always advise to rename, since there is no harm at all to rename the zip to jar. and it just doesn't make sense that oracle name their jdbc driver package as classes12.zip, it is just for historical reason :)

as long as it is working for you, you don't need to rename it.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8182201
>> i found web-inf/lib won't work even just for one webapp
it depend on how you used it. if you use tomcat's connection pool. you are right that it won't work because tomcat server class loader doesn't have access to it. but if you use Class.forName() and DriverManager.getConneciton(), it should be able to work because your webapp's class loader can access it.

anyway, it is not a good practice to put any database driver under web-inf/lib.
0
 

Author Comment

by:changcy77
ID: 8247558
thanks very much.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
Hey fellow admins! This time, I have a little fairy tale for you. As many tales do, it starts boring and then gets pretty gory. I hope you like it. TL;DR: It is about an important security matter, you should read it if you run or administer Windows …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question