DbManager could not retrive a connection. java.sql.SQLExcept
-
ChaseDoggy
- Posts: 8
- Joined: 20 Jun 2007, 16:11
DbManager could not retrive a connection. java.sql.SQLExcept
I've been trying to make the following work:
SmartFoxServer PRO version 1.5.5
java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Server VM (build 1.5.0_11-b03, mixed mode)
MySQL version: 5.0.45-community
Trying to connect with:
mysql-connector-java-5.0.7-bin.jar
Using the following connection string:
<DatabaseManager active="true">
<Driver>org.gjt.mm.mysql.Driver</Driver>
<ConnectionString>jdbc:mysql://x.x.x.x/sBase</ConnectionString>
<UserName>xxxxxx</UserName>
<Password>xxxxxx</Password>
<TestSQL><![CDATA[SELECT COUNT(*) FROM users]]></TestSQL>
<MaxActive>10</MaxActive>
<MaxIdle>10</MaxIdle>
<OnExhaustedPool>fail</OnExhaustedPool>
<BlockTime>5000</BlockTime>
</DatabaseManager>
When I set:
DatabaseManager active="false"
The server will start up normally.
I receive the following error when trying to start SFS:
DB Manager Activated ( org.gjt.mm.mysql.Driver )
jvm 1 | Can't load db driver: org.gjt.mm.mysql.Driver
jvm 1 | 19:01:02.062 - [ SEVERE ] > DbManager could not retrive a connection. java.sql.SQLException: No suitable driver
jvm 1 | it.gotoandplay.smartfoxserver.exceptions.DbManagerException: The Test SQL statement failed! Please check your configuration.
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone(SmartFoxServer.java:1808)
jvm 1 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones(ConfigReader.java:697)
jvm 1 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:288)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:362)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:611)
jvm 1 | Problems in config file: The Test SQL statement failed! Please check your configuration.
jvm 1 | it.gotoandplay.smartfoxserver.exceptions.ConfigurationException: The Test SQL statement failed! Please check your configuration.
jvm 1 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:313)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:362)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:611)
Can anyone help?
Thanks
SmartFoxServer PRO version 1.5.5
java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Server VM (build 1.5.0_11-b03, mixed mode)
MySQL version: 5.0.45-community
Trying to connect with:
mysql-connector-java-5.0.7-bin.jar
Using the following connection string:
<DatabaseManager active="true">
<Driver>org.gjt.mm.mysql.Driver</Driver>
<ConnectionString>jdbc:mysql://x.x.x.x/sBase</ConnectionString>
<UserName>xxxxxx</UserName>
<Password>xxxxxx</Password>
<TestSQL><![CDATA[SELECT COUNT(*) FROM users]]></TestSQL>
<MaxActive>10</MaxActive>
<MaxIdle>10</MaxIdle>
<OnExhaustedPool>fail</OnExhaustedPool>
<BlockTime>5000</BlockTime>
</DatabaseManager>
When I set:
DatabaseManager active="false"
The server will start up normally.
I receive the following error when trying to start SFS:
DB Manager Activated ( org.gjt.mm.mysql.Driver )
jvm 1 | Can't load db driver: org.gjt.mm.mysql.Driver
jvm 1 | 19:01:02.062 - [ SEVERE ] > DbManager could not retrive a connection. java.sql.SQLException: No suitable driver
jvm 1 | it.gotoandplay.smartfoxserver.exceptions.DbManagerException: The Test SQL statement failed! Please check your configuration.
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone(SmartFoxServer.java:1808)
jvm 1 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones(ConfigReader.java:697)
jvm 1 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:288)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:362)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:611)
jvm 1 | Problems in config file: The Test SQL statement failed! Please check your configuration.
jvm 1 | it.gotoandplay.smartfoxserver.exceptions.ConfigurationException: The Test SQL statement failed! Please check your configuration.
jvm 1 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:313)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:362)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:611)
Can anyone help?
Thanks
What happens if you change the driver to
Code: Select all
<Driver>com.mysql.jdbc.Driver</Driver>-
ChaseDoggy
- Posts: 8
- Joined: 20 Jun 2007, 16:11
Unfortunately, same message:
jvm 1 | DB Manager Activated ( com.mysql.jdbc.Driver )
jvm 1 | Can't load db driver: com.mysql.jdbc.Driver
jvm 1 | 10:26:22.220 - [ SEVERE ] > DbManager could not retrive a connection. java.sql.SQLException: No suitable driver
jvm 1 | it.gotoandplay.smartfoxserver.exceptions.DbManagerException: The Test SQL statement failed! Please check your configuration.
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone(SmartFoxServer.java:1808)
jvm 1 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones(ConfigReader.java:697)
jvm 1 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:288)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:362)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:611)
jvm 1 | Problems in config file: The Test SQL statement failed! Please check your configuration.
jvm 1 | it.gotoandplay.smartfoxserver.exceptions.ConfigurationException: The Test SQL statement failed! Please check your configuration.
jvm 1 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:313)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:362)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:611)
jvm 1 | DB Manager Activated ( com.mysql.jdbc.Driver )
jvm 1 | Can't load db driver: com.mysql.jdbc.Driver
jvm 1 | 10:26:22.220 - [ SEVERE ] > DbManager could not retrive a connection. java.sql.SQLException: No suitable driver
jvm 1 | it.gotoandplay.smartfoxserver.exceptions.DbManagerException: The Test SQL statement failed! Please check your configuration.
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone(SmartFoxServer.java:1808)
jvm 1 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones(ConfigReader.java:697)
jvm 1 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:288)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:362)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:611)
jvm 1 | Problems in config file: The Test SQL statement failed! Please check your configuration.
jvm 1 | it.gotoandplay.smartfoxserver.exceptions.ConfigurationException: The Test SQL statement failed! Please check your configuration.
jvm 1 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:313)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:362)
jvm 1 | at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:611)
-
ChaseDoggy
- Posts: 8
- Joined: 20 Jun 2007, 16:11
-
ChaseDoggy
- Posts: 8
- Joined: 20 Jun 2007, 16:11
I have the same problem:
mysql-connector-java-5.1.12-bin.jar is installed into SmartFoxServer_PRO_1.6.6/jre/lib/ext/ but is not working, can you help?
I also updated SmartFoxServer_PRO_1.6.6/Server/conf/wrapper.conf with a new classpath:
wrapper.java.classpath.41=/*path to*/SmartFoxServer_PRO_1.6.6/jre/lib/ext/mysql-connector-java-5.1.12-bin.jar
What am I doing wrong?
p.s.
I'm running on joyent accelerator: SunOS 5.11 snv_121 i86pc i386 i86pc,
SmartFoxServer 1.6.6 64-bit + Tanuki Java Service Wrapper 3.4.0 64-bit Community edition for Solaris x86
Code: Select all
--- [ Zones & Rooms ] -------------------------------------
DB Manager Activated ( com.mysql.jdbc.Driver )
Can't load db driver: com.mysql.jdbc.Driver
04:15:27.300 - [ 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.
I also updated SmartFoxServer_PRO_1.6.6/Server/conf/wrapper.conf with a new classpath:
wrapper.java.classpath.41=/*path to*/SmartFoxServer_PRO_1.6.6/jre/lib/ext/mysql-connector-java-5.1.12-bin.jar
What am I doing wrong?
p.s.
I'm running on joyent accelerator: SunOS 5.11 snv_121 i86pc i386 i86pc,
SmartFoxServer 1.6.6 64-bit + Tanuki Java Service Wrapper 3.4.0 64-bit Community edition for Solaris x86
This manual rules:
http://forums.smartfoxserver.com/viewtopic.php?t=1878

I've updated SmartFoxServer_PRO_1.6.6/Server/start.sh with /*path to*/SmartFoxServer_PRO_1.6.6/jre/lib/ext/mysql-connector-java-5.1.12-bin.jar
and it works now! Thank you.
http://forums.smartfoxserver.com/viewtopic.php?t=1878
I've updated SmartFoxServer_PRO_1.6.6/Server/start.sh with /*path to*/SmartFoxServer_PRO_1.6.6/jre/lib/ext/mysql-connector-java-5.1.12-bin.jar
and it works now! Thank you.
OK, can you explain this for dummies?
This is my error log:
I'm using this in the config file:
And I'm running MySQL thru MAMP at port 3306.
I have this file:
But I'm not sure when or how I installed this (if I did it at all!).
I also tried replacing with "com.mysql.jdbc.Driver", but no go.
So, what should I modify/add/whatever?
Thanks in advance!
This is my error log:
Code: Select all
|::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|
| |
| ...::: SmartFoxServer :::... |
| Multiplayer Socket Server |
| version 1.6.6 |
| --- |
| (c) 2004 - 2009 gotoAndPlay() |
| www.smartfoxserver.com |
| www.gotoandplay.it |
| |
|::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|
::::::::::: { BlueBox INITED } ::::::::::::
: :
: Version 1.0.5 -- (c) 2008 gotoAndPlay() :
: :
:::::::::::::::::::::::::::::::::::::::::::
20:40:23.763 - [ INFO ] > Starting h2 engine...
--- [ System Info ] ------------------------------------------
System CPU(s): 4
VM Max memory: 129 MB
os.name: Mac OS X
os.arch: x86_64
os.version: 10.6.3
java.version: 1.6.0_20
java.vendor: Apple Inc.
java.vendor.url: http://www.apple.com/
java.vm.specification.version: 1.0
java.vm.version: 16.3-b01-279
java.vm.vendor: Apple Inc.
java.vm.name: Java HotSpot(TM) 64-Bit Server VM
--- [ Network Cards ] -----------------------------------------
Card:en5
-> 10.37.129.2
-> fe80:0:0:0:21c:42ff:fe00:9%8
Card:en4
-> 10.211.55.2
-> fe80:0:0:0:21c:42ff:fe00:8%7
Card:en0
-> 192.168.0.10
-> fe80:0:0:0:217:f2ff:fe0c:f91e%4
Card:lo0
-> 127.0.0.1
-> fdf0:507:8fe9:5e5c:217:f2ff:fe0c:f91e
-> fe80:0:0:0:0:0:0:1%1
-> 0:0:0:0:0:0:0:1
--- [ Licence Loaded ] ------------------------------------
License Type -> PRO
License Owner -> --== Free Demo Licence ==--
Max. Clients -> 20
BlueBox Type -> Demo Version
--- [ Zones & Rooms ] -------------------------------------
DB Manager Activated ( org.gjt.mm.mysql.Driver )
Can't load db driver: org.gjt.mm.mysql.Driver
20:40:24.839 - [ 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...Code: Select all
<Driver>org.gjt.mm.mysql.Driver</Driver>
<ConnectionString>jdbc:mysql://localhost:3306/qilania</ConnectionString>I have this file:
Code: Select all
/Applications/Utilities/mysql-connector-java-5.1.10-bin.jarI also tried replacing with "com.mysql.jdbc.Driver", but no go.
So, what should I modify/add/whatever?
Thanks in advance!
Same error was discussed here
http://forums.smartfoxserver.com/viewto ... ation+file
http://forums.smartfoxserver.com/viewto ... ation+file
-
pmilbourne
- Posts: 5
- Joined: 20 Oct 2010, 15:00