DB Manager not work on Ubuntu but work on Win

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
Hatta
Posts: 12
Joined: 04 Dec 2011, 22:37

DB Manager not work on Ubuntu but work on Win

Post 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
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
Hatta
Posts: 12
Joined: 04 Dec 2011, 22:37

Post 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.
Post Reply