Hi,
Sorry I put this mail once more.
I use mm jdbc, I can use "jackwang"/"jackpass" as the user/password to
run mysqladmin. but when I change the user/password from old "nobody"/null
to them in the servlet code, error occured.
"500 Internal Server Error FindClassWj:
java.lang.NullPointerException
DriverManager:java.sql.SQLException: Cannot connect to MySQL server
on wangjun:3306. Is there a MySQL server running on the machine/port
you are trying to connect to? 1"
// String username = "jackwang";
// String password = "jackpass";
String username = "nobody";
String password = null;
String url = "jdbc:mysql://wangjun:3306/test";
try {
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
}
catch(java.lang.ClassNotFoundException e) {
}
catch(java.lang.InstantiationException e) {
}
catch(java.lang.IllegalAccessException e) {
}
try {
// !!!!!!!!! Here error occured.
con = (org.gjt.mm.mysql.Connection)DriverManager.getConnection(url,
username, password);
// !!!!!!!!! Here error occured.
.........
My environment
----------------
servlet:JRUN
mm jdbc: 1.2a
MySQL: 3.21.29gamma
Thanks.
Jack
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html