jdbc class not found exception with tomcat in linux

V

vamp4l

Hey, I'm getting the

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

exception when i try to execute database queries
ive read a bit about it, but i cant figure out how to set my tomcat up
to work properly
i have the .jar file that is supposedly needed, ive tried to put it in
a bunch of different folders with no luck
any suggestions on how to set up the classpath and where the .jar file
needs to go?
thanks
 
I

IchBin

vamp4l said:
Hey, I'm getting the

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

exception when i try to execute database queries
ive read a bit about it, but i cant figure out how to set my tomcat up
to work properly
i have the .jar file that is supposedly needed, ive tried to put it in
a bunch of different folders with no luck
any suggestions on how to set up the classpath and where the .jar file
needs to go?
thanks
As far as I now it goes into

TomcatBase\common\lib



--


Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 
V

vamp4l

hmm...i dont have a common folder but i put it in the lib folder in my
WEB-INF/lib dir
i also tried making a common directory and putting it there
i also tried setting the classpath in the .bashrc file
any idea why this isnt working? or any other suggestions?

export
CLASSPATH=/home/blah/Tomcat/common/lib/mysql-connector-java-3.0.14-production-bin.jar:.
 
I

IchBin

vamp4l said:
hmm...i dont have a common folder but i put it in the lib folder in my
WEB-INF/lib dir
i also tried making a common directory and putting it there
i also tried setting the classpath in the .bashrc file
any idea why this isnt working? or any other suggestions?

export
CLASSPATH=/home/blah/Tomcat/common/lib/mysql-connector-java-3.0.14-production-bin.jar:.
Under Windows Tomcat has a Tomcat5.5\common\lib' subdirectory
where you would put it. Must be different Linux. I have been been a few
years away
from Linux to remember their setup.

You can Google for it like, Tomcat and Database or MySQL and Tomcat. I
found one out there at
http://www.yolinux.com/TUTORIALS/LinuxTutorialTomcat.html#MYSQL

Here is another good link. They are saying the same thing I said about
where the connector goes..
http://alanning.freeshell.org/text/jpetstore/jpetstore_win32_install_walkthrough.html#Tomcat

You may want to search MYSQL website for more info.

--


Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top