Hi!
I have some problems with custom login.
I used this guide (docs2x.smartfoxserver.com/DevelopmentBasics/database-recipes) to do custom login with mySQL database.
I set up Zone (BasicExamples), deployed the Extension by copying it in a subfolder of /root/SmartFoxServer_2X/SFS2X/extensions , installed MySQL JDBC Driver by this guide (marksman.wordpress.com/2009/03/01/setting-up-mysqljdbc-driver-on-ubuntu) and of course I set up mysql-server and imported the 'muppets' table into the database.
But I have error: Login Failure: SQL Error: The DBManager is NOT active in this Zone. SQL Query failed. Please activate it the DBManager from the AdminTool.
I tried to do this 3 times.
Could you help me? I think, there are some mistakes in Zone Database manager because I don't know which port I have to enter (I entered "jdbc:mysql://[i]ip/i]" without port)
Custom login
Re: Custom login
Hi,
can you show me the full stack trace of the error?
Can you also double check that the DBManager is active in the config of the Zone you're working with?
If you don't specify a port number, the JDBC driver will use the default MySQL port, 3306.
Unless you have configured MySQL to run on a different port, there's no problem with not specifying the value.
Cheers
can you show me the full stack trace of the error?
Can you also double check that the DBManager is active in the config of the Zone you're working with?
Could you help me? I think, there are some mistakes in Zone Database manager because I don't know which port I have to enter (I entered "jdbc:mysql://[i]ip/i]" without port)
If you don't specify a port number, the JDBC driver will use the default MySQL port, 3306.
Unless you have configured MySQL to run on a different port, there's no problem with not specifying the value.
Cheers
Re: Custom login
Lapo wrote:Hi,
can you show me the full stack trace of the error?
Can you also double check that the DBManager is active in the config of the Zone you're working with?Could you help me? I think, there are some mistakes in Zone Database manager because I don't know which port I have to enter (I entered "jdbc:mysql://[i]ip/i]" without port)
If you don't specify a port number, the JDBC driver will use the default MySQL port, 3306.
Unless you have configured MySQL to run on a different port, there's no problem with not specifying the value.
Cheers
Re: Custom login
The complete error should be found in the log files under SFS2X/logs/smartfox.log
I see that you're connecting to an external IP address to talk to the database. Is MySQL configure to allow it? By default MySQL denies any connection other than "localhost".
Thanks
I see that you're connecting to an external IP address to talk to the database. Is MySQL configure to allow it? By default MySQL denies any connection other than "localhost".
Thanks
Re: Custom login
Lapo wrote:The complete error should be found in the log files under SFS2X/logs/smartfox.log
I see that you're connecting to an external IP address to talk to the database. Is MySQL configure to allow it? By default MySQL denies any connection other than "localhost".
Thanks
22 Mar 2017 | 14:16:59,464 | ERROR | main | v2.db.SFSDBManager | | java.lang.ClassNotFoundException:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.ClassNotFoundException
Message: org.gjt.mm.mysql.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.findClass(URLClassLoader.java:381)
java.lang.ClassLoader.loadClass(ClassLoader.java:424)
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
java.lang.ClassLoader.loadClass(ClassLoader.java:357)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:264)
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:637)
com.smartfoxserver.v2.entities.managers.SFSZoneManager.createZone(SFSZoneManager.java:398)
com.smartfoxserver.v2.entities.managers.SFSZoneManager.initializeZones(SFSZoneManager.java:239)
com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:292)
com.smartfoxserver.v2.Main.main(Main.java:27)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
I think there are some problems with JDBC Driver. I don't know how to install it correctly
I didn't configure mySQL. Could you help me with it? What should I do?
I tried to deploy JDBC Driver for mySQL to /root/SmartFoxServer_2X/SFS2X/extensions/__lib__ and restart server, but I see the same error.
( /root/SmartFoxServer_2X/SFS2X/extensions/__lib__ )
I'm sorry for a lot of questions.
Re: Custom login
Thanks, this is helpful.
According to MySQL documentation the driver class name to be used is --> com.mysql.jdbc.Driver
Replace that and you should be fine.
Cheers
According to MySQL documentation the driver class name to be used is --> com.mysql.jdbc.Driver
Replace that and you should be fine.
Cheers
Who is online
Users browsing this forum: No registered users and 109 guests