首页上一页 1 下一页尾页 1 条记录 1/1页
Java开发实战宝典第22章的进销存管理系统添加信息只要是中文中乱码,且有错误提示?
发表在Java图书答疑
2010-07-24
是否精华
是
否
版块置顶:
是
否
Java开发实战宝典第22章的进销存管理系统添加信息只要是中文中乱码,且有错误提示?
1、添加信息只要是中文中乱码?
2、错误提示如下:
java.sql.SQLException: General error message from server: "There is no 'root'@'%' registered"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1224)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2248)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2196)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1163)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.showDataToTable(XiaoshouDingdanChaxunFrame.java:148)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.formWindowOpened(XiaoshouDingdanChaxunFrame.java:255)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.access$0(XiaoshouDingdanChaxunFrame.java:253)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame$1.windowOpened(XiaoshouDingdanChaxunFrame.java:62)
at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.sql.SQLException: General error message from server: "There is no 'root'@'%' registered"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1224)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2248)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2196)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1163)
at zzk.zhuoyue.dinggouruku.CaigouDingdanChaxunFrame.showDataToTable(CaigouDingdanChaxunFrame.java:147)
at zzk.zhuoyue.dinggouruku.CaigouDingdanChaxunFrame.formWindowOpened(CaigouDingdanChaxunFrame.java:258)
at zzk.zhuoyue.dinggouruku.CaigouDingdanChaxunFrame.access$0(CaigouDingdanChaxunFrame.java:256)
at zzk.zhuoyue.dinggouruku.CaigouDingdanChaxunFrame$1.windowOpened(CaigouDingdanChaxunFrame.java:61)
at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.sql.SQLException: General error message from server: "There is no 'root'@'%' registered"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1224)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2248)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2196)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1163)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.showDataToTable(XiaoshouDingdanChaxunFrame.java:148)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.formWindowOpened(XiaoshouDingdanChaxunFrame.java:255)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.access$0(XiaoshouDingdanChaxunFrame.java:253)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame$1.windowOpened(XiaoshouDingdanChaxunFrame.java:62)
at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
请问以上两个问题怎么解决啊?
1、添加信息只要是中文中乱码?
2、错误提示如下:
java.sql.SQLException: General error message from server: "There is no 'root'@'%' registered"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1224)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2248)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2196)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1163)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.showDataToTable(XiaoshouDingdanChaxunFrame.java:148)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.formWindowOpened(XiaoshouDingdanChaxunFrame.java:255)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.access$0(XiaoshouDingdanChaxunFrame.java:253)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame$1.windowOpened(XiaoshouDingdanChaxunFrame.java:62)
at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.sql.SQLException: General error message from server: "There is no 'root'@'%' registered"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1224)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2248)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2196)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1163)
at zzk.zhuoyue.dinggouruku.CaigouDingdanChaxunFrame.showDataToTable(CaigouDingdanChaxunFrame.java:147)
at zzk.zhuoyue.dinggouruku.CaigouDingdanChaxunFrame.formWindowOpened(CaigouDingdanChaxunFrame.java:258)
at zzk.zhuoyue.dinggouruku.CaigouDingdanChaxunFrame.access$0(CaigouDingdanChaxunFrame.java:256)
at zzk.zhuoyue.dinggouruku.CaigouDingdanChaxunFrame$1.windowOpened(CaigouDingdanChaxunFrame.java:61)
at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.sql.SQLException: General error message from server: "There is no 'root'@'%' registered"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1224)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2248)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2196)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1163)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.showDataToTable(XiaoshouDingdanChaxunFrame.java:148)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.formWindowOpened(XiaoshouDingdanChaxunFrame.java:255)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame.access$0(XiaoshouDingdanChaxunFrame.java:253)
at zzk.zhuoyue.xiaoshouchuku.XiaoshouDingdanChaxunFrame$1.windowOpened(XiaoshouDingdanChaxunFrame.java:62)
at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at javax.swing.JFrame.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
请问以上两个问题怎么解决啊?