I have started to use SmartFoxServer 2x
. I used to use SmartFoxServer Pro
, but I decided that I should use HTML5
, so I did it. Anyway, there is a problem with Database Manager. First, I will tell you what have I done so far:
I downloaded "mysql-connector-java-5.1.38-bin.jar" file from MySQL's website.
And I copied it into "SmartFoxServer 2X\SFS2X\extensions__lib__" folder.
After that, I entered the admin tool > Zone Configurator > Database Manager.
Activate = yes
Database driver class = com.mysql.jdbc.Driver
Connection string = jdbc:mysql://localhost:3306/login
Username = root
Password = my_mysql_password
Test SQL = SELECT * FROM users
And I restarted the server.
It gave me this error:
Exception: java.lang.ClassNotFoundException
Message: com.mysql.jdbc.Driver
Description: The initialization of the DBManager has failed.
Possible Causes: if the database driver is not 'seen' int the server classpath the setup fails.
Make sure to deploy the driver .jar file in the extensions/__lib__/ folder and restart the Server.
+--- --- ---+
Stack Trace:
+--- --- ---+
java.net.URLClassLoader$1.run(Unknown Source)
java.net.URLClassLoader$1.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(Unknown Source)
java.lang.ClassLoader.loadClass(Unknown Source)
sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
java.lang.ClassLoader.loadClass(Unknown Source)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Unknown Source)
com.smartfoxserver.v2.db.SFSDBManager.setupDriver(SFSDBManager.java:345)
com.smartfoxserver.v2.db.SFSDBManager.init(SFSDBManager.java:62)
com.smartfoxserver.v2.entities.managers.SFSZoneManager.configureDBManager(SFSZoneManager.java:638)
com.smartfoxserver.v2.entities.managers.SFSZoneManager.createZone(SFSZoneManager.java:406)
com.smartfoxserver.v2.entities.managers.SFSZoneManager.initializeZones(SFSZoneManager.java:249)
com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:266)
com.smartfoxserver.v2.Main.main(Main.java:27)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
com.exe4j.runtime.WinLauncher.main(Unknown Source)
com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)
What should I do?
Exception: java.lang.ClassNotFoundException
– SatyaTNVextensions__lib__
is not the same asextensions/__lib__/
make sure you deployed it in the right location. – Mark Rotteveel