Page 1 of 1

[Bug found, fix inside]Can't load db driver: ...

Posted: 13 Jun 2010, 08:25
by KaiKai
Of course I installed it like described in the documentation.

Code: Select all

cd /home/kai/Downloads/SmartFoxServer_PRO_1.6.6/jre/lib
kai@Laptop~/Downloads/SmartFoxServer_PRO_1.6.6/jre/lib$ dir
amd64				      fontconfig.Turbo.bfc
applet				      fontconfig.Turbo.properties.src
audio				      fonts
calendars.properties		      im
charsets.jar			      images
classlist			      jce.jar
cmm				      jexec
content-types.properties	      jsse.jar
ext				      jvm.hprof.txt
flavormap.properties		      logging.properties
fontconfig.bfc			      management
fontconfig.properties.src	      management-agent.jar
fontconfig.RedHat.2.1.bfc	      meta-index
fontconfig.RedHat.2.1.properties.src  [u]mysql-connector-java-5.1.12-bin.jar[/u]
fontconfig.RedHat.3.bfc		      net.properties
fontconfig.RedHat.3.properties.src    oblique-fonts
fontconfig.RedHat.4.bfc		      psfontj2d.properties
fontconfig.RedHat.4.properties.src    psfont.properties.ja
fontconfig.RedHat.bfc		      resources.jar
fontconfig.RedHat.properties.src      rt.jar
fontconfig.Sun.bfc		      security
fontconfig.Sun.properties.src	      servicetag
fontconfig.SuSE.bfc		      sound.properties
fontconfig.SuSE.properties.src	      zi
wrapper.conf(i could post my full conf if necessary, but i didn't change anything else):

Code: Select all

...
wrapper.java.classpath.40=lib/commons-io-1.4.jar
wrapper.java.classpath.41=/home/kai/Downloads/SmartFoxServer_PRO_1.6.6/jre/lib/mysql-connector-java-5.1.12-bin.jar



# Java Library Path (location of Wrapper.DLL or libwrapper.so)

wrapper.java.library.path.1=lib/

...
and finally, start.sh output:

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() :
:                                         :
:::::::::::::::::::::::::::::::::::::::::::


--- [ System Info ] ------------------------------------------

System CPU(s): 1
VM Max memory: 500 MB

os.name: Linux
os.arch: amd64
os.version: 2.6.31-20-generic
java.version: 1.6.0_20
java.vendor: Sun Microsystems Inc.
java.vendor.url: http://java.sun.com/
java.vm.specification.version: 1.0
java.vm.version: 16.3-b01
java.vm.vendor: Sun Microsystems Inc.
java.vm.name: Java HotSpot(TM) 64-Bit Server VM


--- [ Network Cards ] -----------------------------------------

Card:eth2
 -> fe80:0:0:0:224:2cff:fea9:bdc5%3
 -> 192.168.2.12
Card:lo
 -> 0:0:0:0:0:0:0:1%1
 -> 127.0.0.1


--- [ Licence Loaded ] ------------------------------------

License Type 	-> PRO
License Owner 	-> --== Free Demo Licence ==--
Max. Clients 	-> 20
BlueBox Type 	-> Demo Version

--- [ Zones & Rooms ] -------------------------------------

Zone: simpleChat

	The Hall           (id: 1, max: 50, pass:N)
	The Kitchen        (id: 2, max: 50, pass:N)
	The Garden         (id: 3, max: 50, pass:N)
	The Bathroom       (id: 4, max: 50, pass:N)
	The Garage         (id: 5, max: 50, pass:N)
	The Living Room    (id: 6, max: 50, pass:Y)
[jsonSample.as]: JSON Example initialized

	DB Manager Activated ( org.gjt.mm.mysql.Driver )
Can't load db driver: org.gjt.mm.mysql.Driver
Problems in config file: The Test SQL statement failed! Please check your configuration.

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


Shutting down server...

Code: Select all

			<DatabaseManager active="true">
				<!--
				<Driver>sun.jdbc.odbc.JdbcOdbcDriver</Driver>
				<ConnectionString>jdbc:odbc:sfsTest</ConnectionString>
				-->
				
				
				<Driver>org.gjt.mm.mysql.Driver</Driver>
				<ConnectionString>jdbc:mysql://192.168.2.13:3306/sfsTest</ConnectionString>
				
				
				<UserName>smartfox</UserName>
				<Password>pass33</Password>
				
				<TestSQL><![CDATA[SELECT COUNT(*) FROM contacts]]></TestSQL>
				
				<MaxActive>10</MaxActive>
				<MaxIdle>10</MaxIdle>
				
				<OnExhaustedPool>fail</OnExhaustedPool>
				<BlockTime>5000</BlockTime>
					
			</DatabaseManager>

Posted: 14 Jun 2010, 07:37
by christophe.feerik
Try this package name : com.mysql.jdbc.Driver

Posted: 14 Jun 2010, 12:09
by KaiKai
Thank you for your response, but im still getting the error, just with the new driver name. :(

Is there maybe something i forgot to install/modify?

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() :
:                                         :
:::::::::::::::::::::::::::::::::::::::::::


--- [ System Info ] ------------------------------------------

System CPU(s): 1
VM Max memory: 500 MB

os.name: Linux
os.arch: amd64
os.version: 2.6.31-20-generic
java.version: 1.6.0_20
java.vendor: Sun Microsystems Inc.
java.vendor.url: http://java.sun.com/
java.vm.specification.version: 1.0
java.vm.version: 16.3-b01
java.vm.vendor: Sun Microsystems Inc.
java.vm.name: Java HotSpot(TM) 64-Bit Server VM


--- [ Network Cards ] -----------------------------------------

Card:eth2
 -> fe80:0:0:0:224:2cff:fea9:bdc5%3
 -> 192.168.2.12
Card:lo
 -> 0:0:0:0:0:0:0:1%1
 -> 127.0.0.1


--- [ Licence Loaded ] ------------------------------------

License Type 	-> PRO
License Owner 	-> --== Free Demo Licence ==--
Max. Clients 	-> 20
BlueBox Type 	-> Demo Version

--- [ Zones & Rooms ] -------------------------------------

Zone: simpleChat

	The Hall           (id: 1, max: 50, pass:N)
	The Kitchen        (id: 2, max: 50, pass:N)
	The Garden         (id: 3, max: 50, pass:N)
	The Bathroom       (id: 4, max: 50, pass:N)
	The Garage         (id: 5, max: 50, pass:N)
	The Living Room    (id: 6, max: 50, pass:Y)
[jsonSample.as]: JSON Example initialized

	DB Manager Activated ( com.mysql.jdbc.Driver )
Can't load db driver: com.mysql.jdbc.Driver
Problems in config file: The Test SQL statement failed! Please check your configuration.

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


Shutting down server...

Posted: 14 Jun 2010, 12:18
by christophe.feerik
Maybe i'm wrong, but under Windows at least, you do not need to edit your wrapper.conf for the MySQL driver to be loaded by Java.

Furthermore, you have to put the mysql-connector Jar into the jre/lib/ext folder.

Posted: 14 Jun 2010, 13:06
by KaiKai
Unfortunately the Linux version brings its own jre, otherwise it would have already been working. :(

Since i also installed it by the package management just in case i find a way to use the normal jre. If you know how to do this, please tell me. Thank you in advance.

But i could try using the server of the Windows version, that could work if i am lucky.

Posted: 14 Jun 2010, 13:09
by christophe.feerik
No, sorry. I have to pass my turn.
Lapo will surely have your answer.

Posted: 14 Jun 2010, 13:50
by KaiKai
Now i found something weird in the /logs directory:
2010/06/13 00:16:38.328 - [ SEVERE ] [id: 10] (DbManager.executeQuery): DbManager could not retrive a connection. java.sql.SQLException: Configuration file not found

But this can't be since im running it as the owner of all smartfox files. :?

This is getting more and more odd, now i am really confused.

edit: I put it in the lib/ext/ path, but this error still exists.

edit2: found the simple bug...

Your starting script points to the normal jre not the one in the smartfox folder after changing this everything worked fine. So you can either: rewrite your documetation or: modifiy the start.sh to point to the sfs jre. But i guess mofifiying the start.sh would be more likely it since otherwise delivering the non-used jre is pointless and everything has to changed system for the whole system.