x1.instance3650.db.xeround.com-nino_db
[chatserver.sql.MySqlConnection.rehash()]
this is con null [.()]
connection to MySQL server failed
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Cannot load connection class because of underlying exception:
'java.lang.NumberFormatException: For input string: "chatserver"'.
[chatserver.sql.MySqlConnection.connect()]
Exception in thread "AWT-EventQueue-0" [.()]
java.lang.NullPointerException [.()] at
chatserver.sql.MySqlConnection.ensureConnected(MySqlConnection.java:105) [.()] at
chatserver.sql.MySqlConnection.getServerConfig(MySqlConnection.java:936) [.()] at
chatserver.objects.ServerConfig.loadConfigFromSql(ServerConfig.java:57) [.()] at
chatserver.objects.ServerConfig.<init>(ServerConfig.java:49) [.()] at
chatserver.objects.Server.<init>(Server.java:36) [.()] at
chatserver.objects.Server.getInstance(Server.java:88) [.()] at
chatserver.main.ServerMain$1.run(ServerMain.java:24) [.()] at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) [.()] at
java.awt.EventQueue.dispatchEvent(EventQueue.java:597) [.()] at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) [.()]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) [.()]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) [.
()] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) [.()] at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) [.()] at
java.awt.EventDispatchThread.run(EventDispatchThread.java:122) [.()]
这是由以下代码块引发的..
try {
//conn = DriverManager.getConnection ("jdbc:mysql://localhost:chatserver");
// Joshua - change
// dbPassword = "";
conn = DriverManager.getConnection("jdbc:mysql://" + dbHost + ":"
+ dbPort + "/" + dbDatabase + "?" + "user=" + dbUser
+ "&"
+ "password=" + dbPassword);
lastMySqlActionTime = new Date().getTime();
} catch (SQLException e) {
System.out.println("this is con "+conn);
ServerLog.logError("connection to MySQL server failed "+e);
return false;
}
我可以通过命令提示符访问数据库并使用数据库...它不会在驱动程序中引发任何错误...
请有人可以帮助我..谢谢