Page 1 of 1

DB Manager not work on Ubuntu but work on Win

Posted: 04 Dec 2011, 22:53
by Hatta
Hi, I'm trying to start SmartFoxServer with the DB Manager active on the Linux operating system Ubuntu, but I can not.
The Server works until I configure it to connect to MySQL.

I performed the same tasks on Windows and SFS works!
However, summarize everything here:
- I installed the MySQL DB
- I downloaded the connector
- I moved the file mysql-connector-java-1.5.18-bin.jar and even the whole folder "org" in the folders SmartFoxServer_direcotry/jre/lib/ext
- I opened the conf.xml file and add the following lines (deleted those already there)

Code: Select all

<DatabaseManager Active="true">
    <driver>org.gjt.mm.mysql.Driver</Driver>
    <ConnectionString> Jdbc:mysql://127.0.0.1:3306/mysql       </ConnectionString>

    <UserName>*****</ Username>
    <Password>*****</ Password>

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

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

    <OnExhaustedPool>Fail</OnExhaustedPool>
<BlockTime>5000</BlockTime>
</DatabaseManager>
I saved the file and when restart the server I read the following error:

23:38:00.719 - [INFO]> Zone Extension [json] created, for areas: simpleChat
[JsonSample.as]: JSON Example initialized

23:38:00.726 - [INFO]> Default Buddy List persister <INITED>
DB Manager Activated (org.gjt.mm.mysql.Driver)
Can not load db driver: org.gjt.mm.mysql.Driver
23:38:00.728 - [SEVERE]> Could not retrive a connection DBManager. java.sql.SQLException: Configuration file not found
it.gotoandplay.smartfoxserver.exceptions.DbManagerException: The Test SQL statement failed! Please check your configuration.
at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone (SmartFoxServer.java: 1843)
at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones (ConfigReader.java: 806)
at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig (ConfigReader.java: 174)
at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket (SmartFoxServer.java: 339)
at it.gotoandplay.smartfoxserver.SmartFoxServer.run (SmartFoxServer.java: 607)
Problems in config file: The Test SQL statement failed! Please check your configuration.
it.gotoandplay.smartfoxserver.exceptions.ConfigurationException: The Test SQL statement failed! Please check your configuration.
at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig (ConfigReader.java: 199)
at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket (SmartFoxServer.java: 339)
at it.gotoandplay.smartfoxserver.SmartFoxServer.run (SmartFoxServer.java: 607)

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


Shutting down the server ...
In short, as if I had not put the driver.
I performed the same operations on the Windows and everything works.
I thought the MySql service is not active, but it is.

I invent now?

Thank you.

PS.Sorry for any mistakes, I'm Italian

Posted: 05 Dec 2011, 09:31
by Lapo
The connection string looks bad... you have a an empty space before the first character. Also keep the string strictly in lower chars

Posted: 05 Dec 2011, 23:22
by Hatta
Hi Lapo.
Sorry but the string is correct only that, then copy paste from Ubuntu to forum, automatically (not know why) were added spaces and converted to uppercase letters.

So I thought, since the settings in Ubutnu I have not handwritten but I did copy / paste, in crimes there was some strange character "invisible".

I deleted everything and re-written by hand and now it works.
Thank you.