[SOLVED] Can't load db driver: org.gjt.mm.mysql.Driver

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

virual
Posts: 15
Joined: 13 Dec 2010, 14:03

[SOLVED] Can't load db driver: org.gjt.mm.mysql.Driver

Postby virual » 13 Dec 2010, 14:12

Okay... I've got a new VPS and got everything set up. It's Linux CentOS.
JRE, MySQL, and Smartfox all installed properly.
Smartfox ran properly with the default settings.

I have had a local windows version of smartfox running properly for quite some time, so I know how to install the mysql connector.

mysql-connector-java-5.1.14-bin.jar is in jre/lib/ext folder
Driver.java is in jre/lib/ext/org/gjt/mm/mysql folder

I copied over my config.xml from my already working local smartfox config...

<DatabaseManager active="true">

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

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

<TestSQL><![CDATA[SELECT * FROM ks_users]]></TestSQL>

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

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

</DatabaseManager>

I already tried adding a path to the mysql connector in my start.sh file.....

So what on earth is the problem here? :(
Last edited by virual on 13 Dec 2010, 15:09, edited 1 time in total.
virual
Posts: 15
Joined: 13 Dec 2010, 14:03

Postby virual » 13 Dec 2010, 14:13

The error:

DB Manager Activated ( org.gjt.mm.mysql.Driver )
Can't load db driver: org.gjt.mm.mysql.Driver
09:14:38.845 - [ SEVERE ] > DbManager could not retrive a connection. 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 server...
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 13 Dec 2010, 14:36

The Test SQL statement failed!

are you sure the test query works ?
virual
Posts: 15
Joined: 13 Dec 2010, 14:03

Postby virual » 13 Dec 2010, 14:38

The problem is fixed.
Seems when I added the class path to start.sh, smartfox didn't like to read it using a local path.
I had initially added "lib/ext/mysql-connector-java-5.1.15-bin.jar".
Changing this to "/root/SmartFoxServer_PRO_1.6.6/jre/lib/ext/mysql-connector-java-5.1.15-bin.jar" fixed the problem.

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 7 guests