Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-04-2006, 06:41 PM   #1
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Rep: Reputation: 15
JSP and MySQL - unable to load JDBC driver

hello gurus,
need your help once again. i am trying to program using jsp to do simple data insertion and extraction to and from mysql database. i have some .jsp files that works at my school but when i transferred them here at my home linux box, it's giving:

Unable to load MySQL JDBC driver.
SQLException: No suitable driver SQLState: 08001 VendorError: 0

here's what i have done:
1) previously installed apache, mysql, and php. my linux distro is fedora core 4. i know mysql works because i have programs written in php to write and read data to and from mysql.
2) i just installed tomcat. it shows my html files that i put in its webapss folder so i know tomcat works.
3) i have java sdk installed. i know it works too because i can run java programs.
4) when doing research, i read somewhere that i need to copy jdbc driver on to my tomcat_folder/server/lib. i have copied two (2) drivers there. a)mm.mysql-2.0.8-bin.jar from my books cd. b) mysql-connector-java-3.1.13-bin.jar from mysql's website (j connector).

in my jsp program, here are the lines i got from my school versus and my edited version. both of them does not work on my linux machine.

School (works at school but not at home):
Connection conn = DriverManager.getConnection ( "jdbc:mysql://", "jtuko", "password" );

**or the from school**
Connection conn = DriverManager.getConnection ( "jdbc:mysql://localhost/jtuko", "jtuko", "password" );

im am not sure what the url is supposed to be in connection line. my understanding is jdbc:mysql:// should be followed by nameofserver/nameofdatabase then username and password.

please help.
Old 09-04-2006, 10:11 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Two suggestions:

1. Try copying the two jar files to your common/lib directory (and *definitely* reboot Tomcat!)

2. Try looking in your tomcat /log directory: it might give you some better clues as to the exact problem.

'Hope that helps .. PSM
Old 09-05-2006, 11:02 AM   #3
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Original Poster
Rep: Reputation: 15
hi paul,
thank you!!!!! i copied the 2 drivers to /tomcat/common/lib folder and it works!!!! also, i tried using:




and both of them work as well. so thank you for the suggestions.

have a great day!



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to load wacom driver module after compiling for a kernel dr_zayus69 Linux - Kernel 1 06-28-2006 09:38 AM
Unable to load i915 driver using FC4 on an Inspiron 6000 Sedmic Linux - Laptop and Netbook 1 01-06-2006 08:26 PM
KDE unable to load after driver-installation primetime2 Linux - General 3 12-19-2004 03:55 AM
JDBC and MySQL Driver White R4bbit Debian 2 08-13-2004 04:55 PM
MySQL and JDBC oulevon Programming 1 07-16-2001 06:18 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration