LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-14-2003, 07:43 PM   #1
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Rep: Reputation: 15
MySQL access problem. URGENT. Please help!


When I try to access the database from a web application, I keep getting these error messages:
Code:
/webapps/MyApp/WEB-INF/classes/org/gjt/mm/mysql/Driver.java:126:
class org.gjt.mm.mysql.Connection is an abstract class. It can't be instantiated.
                    return new Connection (host(), port(), _Props, database(), Url, this);

/webapps/MyApp/WEB-INF/classes/org/gjt/mm/mysql/MysqlIO.java:508:
class org.gjt.mm.mysql.ResultSet is an abstract class. It can't be instantiated.
            return new ResultSet(updateCount, updateID);
When I check the log file, there are lines like
Code:
Server configuration denies access to data source
I tried for days to fix it, but in vain. Here's some additional info about the scenario:

(1) I'm using MySQL bundled with RedHat 8.0
(2) The Web server is a JSP engine called Resin.
(3) Things were working fine; until I changed the database root password (not OS root account), which was empty before I changed it.
(4) I tried the following in my attempt to make it work: setting database root password back to empty; removing the database; installing a separate MySQL system in "/usr/local"; re-installing Linux. But it still does not work (the same error messages).

I'm not sure about the nature of this issue. MySQL access privileges? JDBC driver corruption? Java code problem?

Incidentally, this application (exactly the same code and database) is running PERFECTLY fine on Windows 2000 Server, even if I changed the database root password.

I've been thinking about migrating from Windows to Linux, but this is driving me crazy. Please HELP!
 
Old 03-14-2003, 08:16 PM   #2
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Original Poster
Rep: Reputation: 15
And the Java code is as follows. Please look into my problem and help me fix it.
Code:
public Connection DBconnect() {
	Connection con = null;
	try {
		Class.forName("org.gjt.mm.mysql.Driver").newInstance();
		String url = "jdbc:mysql://"+DBserver+"/"+DBNAME+"?user="+DBuser+"&password="+DBpasswd+"&useUnicode=true&characterEncoding=GB2312";
		con = DriverManager.getConnection(url, "", "");
	}
	catch(Exception e) {
		System.out.println(e.getMessage());
	}
	return con;
} // end of DBconnect
 
Old 03-15-2003, 06:54 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
do not mark anything as urgent, it's just plain rude.
 
Old 03-15-2003, 07:42 PM   #4
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Original Poster
Rep: Reputation: 15
Sorry, acid_kewpie. I'll follow your advice.

The issue is temporarily resolved. I replaced the driver files, re-installed lots of things. I don't know which of what I did worked.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Help... Urgent thachp Linux - Software 15 05-14-2005 09:04 AM
I've got an error massage when i install MySql,urgent novmcgrady Linux - Software 1 05-12-2005 08:37 PM
mysql problem, urgent chadi Linux - General 2 12-08-2004 05:46 PM
mysql error, urgent please help chadi Linux - General 1 11-12-2004 06:56 AM
MySQL Access problem from Aqua Data Studio stedo Linux - Software 0 10-03-2003 02:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:19 AM.

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