2013-09-02 4 views
0

Я пытался подключиться к mysql через JDBC в config.xml.Настройка подключения к серверу MySQL в SmartFoxServer

Я изменил значение по умолчанию для собственных значений, как показано ниже:

<DatabaseManager active="true"> 


     <Driver>org.gjt.mm.mysql.Driver</Driver> 
     <ConnectionString>jdbc:mysql://127.0.0.1:3306/mysql</ConnectionString> 

     <UserName>root</UserName> 
     <Password></Password> 

     <TestSQL><![CDATA[SELECT NOW()]]></TestSQL> 

     <MaxActive>10</MaxActive> 
     <MaxIdle>10</MaxIdle> 

     <OnExhaustedPool>fail</OnExhaustedPool> 
     <BlockTime>5000</BlockTime> 

</DatabaseManager> 

Но когда я пытаюсь запустить SmartFoxServer, получить следующие ошибки:

 DB Manager Activated (org.gjt.mm.mysql.Driver) 
Can't load db driver: org.gjt.mm.mysql.Driver 
11:13:16.054 - [ SEVERE ] > DbManager could not retrive a connection. java.sql.S 
QLException: Configuration file not found 
it.gotoandplay.smartfoxserver.exceptions.DbManagerException: The Test SQL statem 
ent failed! Please check your configuration. 
     at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone(SmartFoxServer 
.java:1843) 
     at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones(ConfigRead 
er.java:806) 
     at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigR 
eader.java:174) 
     at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFo 
xServer.java:339) 
     at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java: 
607) 
Problems in config file: The Test SQL statement failed! Please check your config 
uration. 
it.gotoandplay.smartfoxserver.exceptions.ConfigurationException: The Test SQL st 
atement failed! Please check your configuration. 
     at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigR 
eader.java:199) 
     at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFo 
xServer.java:339) 
     at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java: 
607) 

Errors found in configuration files. 
Unable to start the server. 


Shutting down server... 

Press any key to continue . . . 

Пожалуйста, скажите мне, что я делаю неправильно ?

Любая помощь будет оценена по достоинству.

ответ

1

Я нашел ответ.

Если скопировать MySQL Connector/J в:

C:\ProgramFiles(x86)\MySQL\MySQL Connector J\mysql-connector-java-5.1.26-bin.jar 

к:

C:\Users\username\SmartFoxServerPRO_1.6.6\jre\lib\ext\ 

А затем перезапустить SFS.

Он работал как шарм. Удачи.

Смежные вопросы