Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-05-2012, 06:18 AM   #1
vinod 123
LQ Newbie
Registered: Feb 2012
Posts: 1

Rep: Reputation: Disabled
Smile Error to JDBC Conectivity

i need help for the i am trying program through jsp for mysql database conectivity it not load driver it display an error like
JDBC Driver cannot be loaded and it display error Driver name as it is
on in browser window
I try with another driver it give me same error with driver name in

i try one program without using JSP & run it it not give me any error..
please Help me......
Old 02-06-2012, 01:04 PM   #2
Registered: Jan 2010
Location: india/pune
Distribution: Arch Fedora20
Posts: 126

Rep: Reputation: 18
which server are you using tomcat or glassfish? try a simple program and paste the complete output.
import java.sql.*;
import javax.sql.*;

public class jdbcdemo{

public static void main(String args[]){
String dbtime;
String dbUrl = "jdbc:mysql://your.database.domain/yourDBname";
String dbClass = "com.mysql.jdbc.Driver";
String query = "Select * FROM users";

try {

Connection con = DriverManager.getConnection (dbUrl);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(query);

while ( {
dbtime = rs.getString(1);
} //end while

} //end try

catch(ClassNotFoundException e) {

catch(SQLException e) {

} //end main

} //end class


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
JDBC and MySQL Under Linux, Error KittenKoder Ubuntu 1 08-21-2008 07:47 AM
postgresql jdbc connection error dsids Programming 3 12-29-2006 06:27 AM
VPN conectivity headache jdlcomputers Linux - Networking 5 01-01-2005 01:52 PM
Fax Modem Conectivity nrbhadane Linux - Hardware 4 12-17-2003 07:48 PM
LAN Conectivity saroj Linux - Networking 1 11-16-2001 06:27 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:14 PM.

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